syntax = "proto3";
option go_package = "./pb";

package pb;

import "models/rpc_messages.proto";

service HTTPHeaderService {
	// 创建Header
	rpc createHTTPHeader (CreateHTTPHeaderRequest) returns (CreateHTTPHeaderResponse);

	// 修改Header
	rpc updateHTTPHeader (UpdateHTTPHeaderRequest) returns (RPCSuccess);

	// 查找配置
	rpc findEnabledHTTPHeaderConfig (FindEnabledHTTPHeaderConfigRequest) returns (FindEnabledHTTPHeaderConfigResponse);
}

// 创建Header
message CreateHTTPHeaderRequest {
	string name = 1;
	string value = 2;
}

message CreateHTTPHeaderResponse {
	int64 headerId = 1;
}

// 修改Header
message UpdateHTTPHeaderRequest {
	int64 headerId = 1;
	string name = 2;
	string value = 3;
}

// 查找配置
message FindEnabledHTTPHeaderConfigRequest {
	int64 headerId = 1;
}

message FindEnabledHTTPHeaderConfigResponse {
	bytes headerJSON = 1;
}