grpcConfig

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 16, 2021 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_config_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type DelRequest added in v1.1.0

type DelRequest struct {
	Env       string `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`             //环境
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` //命名空间
	Project   string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"`     //项目
	Version   string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`     //版本
	// contains filtered or unexported fields
}

删除 请求字段

func (*DelRequest) Descriptor deprecated added in v1.1.0

func (*DelRequest) Descriptor() ([]byte, []int)

Deprecated: Use DelRequest.ProtoReflect.Descriptor instead.

func (*DelRequest) GetEnv added in v1.1.0

func (x *DelRequest) GetEnv() string

func (*DelRequest) GetNamespace added in v1.1.0

func (x *DelRequest) GetNamespace() string

func (*DelRequest) GetProject added in v1.1.0

func (x *DelRequest) GetProject() string

func (*DelRequest) GetVersion added in v1.1.0

func (x *DelRequest) GetVersion() string

func (*DelRequest) ProtoMessage added in v1.1.0

func (*DelRequest) ProtoMessage()

func (*DelRequest) ProtoReflect added in v1.1.0

func (x *DelRequest) ProtoReflect() protoreflect.Message

func (*DelRequest) Reset added in v1.1.0

func (x *DelRequest) Reset()

func (*DelRequest) String added in v1.1.0

func (x *DelRequest) String() string

type DelResponse added in v1.1.0

type DelResponse struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` //状态编码
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`    //状态信息
	// contains filtered or unexported fields
}

删除返回信息

func (*DelResponse) Descriptor deprecated added in v1.1.0

func (*DelResponse) Descriptor() ([]byte, []int)

Deprecated: Use DelResponse.ProtoReflect.Descriptor instead.

func (*DelResponse) GetCode added in v1.1.0

func (x *DelResponse) GetCode() int32

func (*DelResponse) GetMsg added in v1.1.0

func (x *DelResponse) GetMsg() string

func (*DelResponse) ProtoMessage added in v1.1.0

func (*DelResponse) ProtoMessage()

func (*DelResponse) ProtoReflect added in v1.1.0

func (x *DelResponse) ProtoReflect() protoreflect.Message

func (*DelResponse) Reset added in v1.1.0

func (x *DelResponse) Reset()

func (*DelResponse) String added in v1.1.0

func (x *DelResponse) String() string

type GrpcConfig

type GrpcConfig interface {
	Get(ctx context.Context, req *Request) (res *Response, err error)
	Put(ctx context.Context, req *PutRequest) (res *PutResponse, err error)
	Del(ctx context.Context, req *DelRequest) (res *DelResponse, err error)
}

type PutRequest

type PutRequest struct {
	Env       string `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`             //环境
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` //命名空间
	Project   string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"`     //项目
	Version   string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`     //版本
	Data      string `protobuf:"bytes,5,opt,name=data,proto3" json:"data,omitempty"`           //数据
	// contains filtered or unexported fields
}

添加数据请求字段

func (*PutRequest) Descriptor deprecated

func (*PutRequest) Descriptor() ([]byte, []int)

Deprecated: Use PutRequest.ProtoReflect.Descriptor instead.

func (*PutRequest) GetData

func (x *PutRequest) GetData() string

func (*PutRequest) GetEnv

func (x *PutRequest) GetEnv() string

func (*PutRequest) GetNamespace

func (x *PutRequest) GetNamespace() string

func (*PutRequest) GetProject

func (x *PutRequest) GetProject() string

func (*PutRequest) GetVersion

func (x *PutRequest) GetVersion() string

func (*PutRequest) ProtoMessage

func (*PutRequest) ProtoMessage()

func (*PutRequest) ProtoReflect

func (x *PutRequest) ProtoReflect() protoreflect.Message

func (*PutRequest) Reset

func (x *PutRequest) Reset()

func (*PutRequest) String

func (x *PutRequest) String() string

type PutResponse

type PutResponse struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` //状态编码
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`    //状态信息
	// contains filtered or unexported fields
}

添加数据返回信息

func (*PutResponse) Descriptor deprecated

func (*PutResponse) Descriptor() ([]byte, []int)

Deprecated: Use PutResponse.ProtoReflect.Descriptor instead.

func (*PutResponse) GetCode

func (x *PutResponse) GetCode() int32

func (*PutResponse) GetMsg

func (x *PutResponse) GetMsg() string

func (*PutResponse) ProtoMessage

func (*PutResponse) ProtoMessage()

func (*PutResponse) ProtoReflect

func (x *PutResponse) ProtoReflect() protoreflect.Message

func (*PutResponse) Reset

func (x *PutResponse) Reset()

func (*PutResponse) String

func (x *PutResponse) String() string

type Request

type Request struct {
	Env       string `protobuf:"bytes,1,opt,name=env,proto3" json:"env,omitempty"`             //环境
	Namespace string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"` //命名空间
	Project   string `protobuf:"bytes,3,opt,name=project,proto3" json:"project,omitempty"`     //项目
	Version   string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"`     //版本
	// contains filtered or unexported fields
}

请求字段信息

func (*Request) Descriptor deprecated

func (*Request) Descriptor() ([]byte, []int)

Deprecated: Use Request.ProtoReflect.Descriptor instead.

func (*Request) GetEnv

func (x *Request) GetEnv() string

func (*Request) GetNamespace

func (x *Request) GetNamespace() string

func (*Request) GetProject

func (x *Request) GetProject() string

func (*Request) GetVersion

func (x *Request) GetVersion() string

func (*Request) ProtoMessage

func (*Request) ProtoMessage()

func (*Request) ProtoReflect

func (x *Request) ProtoReflect() protoreflect.Message

func (*Request) Reset

func (x *Request) Reset()

func (*Request) String

func (x *Request) String() string

type Response

type Response struct {
	Code int32  `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"` //状态编码
	Msg  string `protobuf:"bytes,2,opt,name=msg,proto3" json:"msg,omitempty"`    //状态信息
	Data string `protobuf:"bytes,3,opt,name=data,proto3" json:"data,omitempty"`  //数据
	// contains filtered or unexported fields
}

返回信息

func (*Response) Descriptor deprecated

func (*Response) Descriptor() ([]byte, []int)

Deprecated: Use Response.ProtoReflect.Descriptor instead.

func (*Response) GetCode

func (x *Response) GetCode() int32

func (*Response) GetData

func (x *Response) GetData() string

func (*Response) GetMsg

func (x *Response) GetMsg() string

func (*Response) ProtoMessage

func (*Response) ProtoMessage()

func (*Response) ProtoReflect

func (x *Response) ProtoReflect() protoreflect.Message

func (*Response) Reset

func (x *Response) Reset()

func (*Response) String

func (x *Response) String() string

Directories

Path Synopsis
Code generated by Kitex v0.1.0.
Code generated by Kitex v0.1.0.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL