config

package
v0.0.0-...-0b10f05 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2022 License: GPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ValueType_name = map[int32]string{
		0:  "failed",
		1:  "Bool",
		2:  "Duration",
		3:  "Float64",
		4:  "Int",
		5:  "Int32",
		6:  "Int64",
		7:  "IntSlice",
		8:  "String",
		9:  "StringSlice",
		10: "Time",
		11: "Uint",
		12: "Uint32",
		13: "Uint64",
	}
	ValueType_value = map[string]int32{
		"failed":      0,
		"Bool":        1,
		"Duration":    2,
		"Float64":     3,
		"Int":         4,
		"Int32":       5,
		"Int64":       6,
		"IntSlice":    7,
		"String":      8,
		"StringSlice": 9,
		"Time":        10,
		"Uint":        11,
		"Uint32":      12,
		"Uint64":      13,
	}
)

Enum value maps for ValueType.

View Source
var Config_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "config.Config",
	HandlerType: (*ConfigServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "Get",
			Handler:    _Config_Get_Handler,
		},
		{
			MethodName: "Set",
			Handler:    _Config_Set_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "config.proto",
}

Config_ServiceDesc is the grpc.ServiceDesc for Config service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

View Source
var File_config_proto protoreflect.FileDescriptor

Functions

func RegisterConfigServer

func RegisterConfigServer(s grpc.ServiceRegistrar, srv ConfigServer)

Types

type ConfigClient

type ConfigClient interface {
	Get(ctx context.Context, in *GetConfigRequest, opts ...grpc.CallOption) (*GetConfigResponse, error)
	Set(ctx context.Context, in *SetConfigRequest, opts ...grpc.CallOption) (*SetConfigResponse, error)
}

ConfigClient is the client API for Config service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewConfigClient

func NewConfigClient(cc grpc.ClientConnInterface) ConfigClient

type ConfigServer

type ConfigServer interface {
	Get(context.Context, *GetConfigRequest) (*GetConfigResponse, error)
	Set(context.Context, *SetConfigRequest) (*SetConfigResponse, error)
	// contains filtered or unexported methods
}

ConfigServer is the server API for Config service. All implementations must embed UnimplementedConfigServer for forward compatibility

type GetConfigRequest

type GetConfigRequest struct {
	Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	// contains filtered or unexported fields
}

func (*GetConfigRequest) Descriptor deprecated

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

Deprecated: Use GetConfigRequest.ProtoReflect.Descriptor instead.

func (*GetConfigRequest) GetKey

func (x *GetConfigRequest) GetKey() string

func (*GetConfigRequest) ProtoMessage

func (*GetConfigRequest) ProtoMessage()

func (*GetConfigRequest) ProtoReflect

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

func (*GetConfigRequest) Reset

func (x *GetConfigRequest) Reset()

func (*GetConfigRequest) String

func (x *GetConfigRequest) String() string

type GetConfigResponse

type GetConfigResponse struct {
	Success      bool      `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	ErrorMessage string    `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	Key          string    `protobuf:"bytes,3,opt,name=key,proto3" json:"key,omitempty"`
	Value        string    `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	Type         ValueType `protobuf:"varint,5,opt,name=type,proto3,enum=config.ValueType" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*GetConfigResponse) Descriptor deprecated

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

Deprecated: Use GetConfigResponse.ProtoReflect.Descriptor instead.

func (*GetConfigResponse) GetErrorMessage

func (x *GetConfigResponse) GetErrorMessage() string

func (*GetConfigResponse) GetKey

func (x *GetConfigResponse) GetKey() string

func (*GetConfigResponse) GetSuccess

func (x *GetConfigResponse) GetSuccess() bool

func (*GetConfigResponse) GetType

func (x *GetConfigResponse) GetType() ValueType

func (*GetConfigResponse) GetValue

func (x *GetConfigResponse) GetValue() string

func (*GetConfigResponse) ProtoMessage

func (*GetConfigResponse) ProtoMessage()

func (*GetConfigResponse) ProtoReflect

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

func (*GetConfigResponse) Reset

func (x *GetConfigResponse) Reset()

func (*GetConfigResponse) String

func (x *GetConfigResponse) String() string

type SetConfigRequest

type SetConfigRequest struct {
	Key   string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
	Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"`
	// contains filtered or unexported fields
}

func (*SetConfigRequest) Descriptor deprecated

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

Deprecated: Use SetConfigRequest.ProtoReflect.Descriptor instead.

func (*SetConfigRequest) GetKey

func (x *SetConfigRequest) GetKey() string

func (*SetConfigRequest) GetValue

func (x *SetConfigRequest) GetValue() string

func (*SetConfigRequest) ProtoMessage

func (*SetConfigRequest) ProtoMessage()

func (*SetConfigRequest) ProtoReflect

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

func (*SetConfigRequest) Reset

func (x *SetConfigRequest) Reset()

func (*SetConfigRequest) String

func (x *SetConfigRequest) String() string

type SetConfigResponse

type SetConfigResponse struct {
	Success      bool   `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"`
	ErrorMessage string `protobuf:"bytes,2,opt,name=error_message,json=errorMessage,proto3" json:"error_message,omitempty"`
	// contains filtered or unexported fields
}

func (*SetConfigResponse) Descriptor deprecated

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

Deprecated: Use SetConfigResponse.ProtoReflect.Descriptor instead.

func (*SetConfigResponse) GetErrorMessage

func (x *SetConfigResponse) GetErrorMessage() string

func (*SetConfigResponse) GetSuccess

func (x *SetConfigResponse) GetSuccess() bool

func (*SetConfigResponse) ProtoMessage

func (*SetConfigResponse) ProtoMessage()

func (*SetConfigResponse) ProtoReflect

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

func (*SetConfigResponse) Reset

func (x *SetConfigResponse) Reset()

func (*SetConfigResponse) String

func (x *SetConfigResponse) String() string

type UnimplementedConfigServer

type UnimplementedConfigServer struct {
}

UnimplementedConfigServer must be embedded to have forward compatible implementations.

func (UnimplementedConfigServer) Get

func (UnimplementedConfigServer) Set

type UnsafeConfigServer

type UnsafeConfigServer interface {
	// contains filtered or unexported methods
}

UnsafeConfigServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ConfigServer will result in compilation errors.

type ValueType

type ValueType int32
const (
	ValueType_failed      ValueType = 0
	ValueType_Bool        ValueType = 1
	ValueType_Duration    ValueType = 2
	ValueType_Float64     ValueType = 3
	ValueType_Int         ValueType = 4
	ValueType_Int32       ValueType = 5
	ValueType_Int64       ValueType = 6
	ValueType_IntSlice    ValueType = 7
	ValueType_String      ValueType = 8
	ValueType_StringSlice ValueType = 9
	ValueType_Time        ValueType = 10
	ValueType_Uint        ValueType = 11
	ValueType_Uint32      ValueType = 12
	ValueType_Uint64      ValueType = 13
)

func (ValueType) Descriptor

func (ValueType) Descriptor() protoreflect.EnumDescriptor

func (ValueType) Enum

func (x ValueType) Enum() *ValueType

func (ValueType) EnumDescriptor deprecated

func (ValueType) EnumDescriptor() ([]byte, []int)

Deprecated: Use ValueType.Descriptor instead.

func (ValueType) Number

func (x ValueType) Number() protoreflect.EnumNumber

func (ValueType) String

func (x ValueType) String() string

func (ValueType) Type

Jump to

Keyboard shortcuts

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