setting

package
v3.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SettingSvc_CreateSetting_FullMethodName   = "/setting.SettingSvc/CreateSetting"
	SettingSvc_GetSetting_FullMethodName      = "/setting.SettingSvc/GetSetting"
	SettingSvc_GetSettingValue_FullMethodName = "/setting.SettingSvc/GetSettingValue"
	SettingSvc_UpdateSetting_FullMethodName   = "/setting.SettingSvc/UpdateSetting"
	SettingSvc_ListSettings_FullMethodName    = "/setting.SettingSvc/ListSettings"
	SettingSvc_CreateScope_FullMethodName     = "/setting.SettingSvc/CreateScope"
	SettingSvc_GetScope_FullMethodName        = "/setting.SettingSvc/GetScope"
	SettingSvc_ListScopes_FullMethodName      = "/setting.SettingSvc/ListScopes"
)

Variables

View Source
var (
	DataType_name = map[int32]string{
		0: "DATA_TYPE_UNKNOWN",
		1: "DATA_TYPE_STRING",
		2: "DATA_TYPE_INTEGER",
		3: "DATA_TYPE_FLOAT",
		4: "DATA_TYPE_BOOLEAN",
	}
	DataType_value = map[string]int32{
		"DATA_TYPE_UNKNOWN": 0,
		"DATA_TYPE_STRING":  1,
		"DATA_TYPE_INTEGER": 2,
		"DATA_TYPE_FLOAT":   3,
		"DATA_TYPE_BOOLEAN": 4,
	}
)

Enum value maps for DataType.

View Source
var (
	ValueType_name = map[int32]string{
		0: "VALUE_TYPE_UNKNOWN",
		1: "VALUE_TYPE_SCALAR",
		2: "VALUE_TYPE_ARRAY",
		3: "VALUE_TYPE_MAP",
	}
	ValueType_value = map[string]int32{
		"VALUE_TYPE_UNKNOWN": 0,
		"VALUE_TYPE_SCALAR":  1,
		"VALUE_TYPE_ARRAY":   2,
		"VALUE_TYPE_MAP":     3,
	}
)

Enum value maps for ValueType.

View Source
var File_setting_setting_proto protoreflect.FileDescriptor
View Source
var SettingSvc_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "setting.SettingSvc",
	HandlerType: (*SettingSvcServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSetting",
			Handler:    _SettingSvc_CreateSetting_Handler,
		},
		{
			MethodName: "GetSetting",
			Handler:    _SettingSvc_GetSetting_Handler,
		},
		{
			MethodName: "GetSettingValue",
			Handler:    _SettingSvc_GetSettingValue_Handler,
		},
		{
			MethodName: "UpdateSetting",
			Handler:    _SettingSvc_UpdateSetting_Handler,
		},
		{
			MethodName: "ListSettings",
			Handler:    _SettingSvc_ListSettings_Handler,
		},
		{
			MethodName: "CreateScope",
			Handler:    _SettingSvc_CreateScope_Handler,
		},
		{
			MethodName: "GetScope",
			Handler:    _SettingSvc_GetScope_Handler,
		},
		{
			MethodName: "ListScopes",
			Handler:    _SettingSvc_ListScopes_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "setting/setting.proto",
}

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

Functions

func RegisterSettingSvcServer

func RegisterSettingSvcServer(s grpc.ServiceRegistrar, srv SettingSvcServer)

Types

type CreateScopeRequest

type CreateScopeRequest struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace   string `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	DisplayName string `protobuf:"bytes,3,opt,name=displayName,proto3" json:"displayName,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateScopeRequest) Descriptor deprecated

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

Deprecated: Use CreateScopeRequest.ProtoReflect.Descriptor instead.

func (*CreateScopeRequest) GetDisplayName

func (x *CreateScopeRequest) GetDisplayName() string

func (*CreateScopeRequest) GetName

func (x *CreateScopeRequest) GetName() string

func (*CreateScopeRequest) GetNamespace

func (x *CreateScopeRequest) GetNamespace() string

func (*CreateScopeRequest) ProtoMessage

func (*CreateScopeRequest) ProtoMessage()

func (*CreateScopeRequest) ProtoReflect

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

func (*CreateScopeRequest) Reset

func (x *CreateScopeRequest) Reset()

func (*CreateScopeRequest) String

func (x *CreateScopeRequest) String() string

type CreateSettingRequest

type CreateSettingRequest struct {
	Name      string            `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Namespace string            `protobuf:"bytes,2,opt,name=namespace,proto3" json:"namespace,omitempty"`
	Labels    map[string]string `` /* 153-byte string literal not displayed */
	Value     string            `protobuf:"bytes,4,opt,name=value,proto3" json:"value,omitempty"`
	Property  *Property         `protobuf:"bytes,5,opt,name=property,proto3" json:"property,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSettingRequest) Descriptor deprecated

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

Deprecated: Use CreateSettingRequest.ProtoReflect.Descriptor instead.

func (*CreateSettingRequest) GetLabels

func (x *CreateSettingRequest) GetLabels() map[string]string

func (*CreateSettingRequest) GetName

func (x *CreateSettingRequest) GetName() string

func (*CreateSettingRequest) GetNamespace

func (x *CreateSettingRequest) GetNamespace() string

func (*CreateSettingRequest) GetProperty

func (x *CreateSettingRequest) GetProperty() *Property

func (*CreateSettingRequest) GetValue

func (x *CreateSettingRequest) GetValue() string

func (*CreateSettingRequest) ProtoMessage

func (*CreateSettingRequest) ProtoMessage()

func (*CreateSettingRequest) ProtoReflect

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

func (*CreateSettingRequest) Reset

func (x *CreateSettingRequest) Reset()

func (*CreateSettingRequest) String

func (x *CreateSettingRequest) String() string

type DataType

type DataType int32
const (
	DataType_DATA_TYPE_UNKNOWN DataType = 0
	DataType_DATA_TYPE_STRING  DataType = 1
	DataType_DATA_TYPE_INTEGER DataType = 2
	DataType_DATA_TYPE_FLOAT   DataType = 3
	DataType_DATA_TYPE_BOOLEAN DataType = 4
)

func (DataType) Descriptor

func (DataType) Descriptor() protoreflect.EnumDescriptor

func (DataType) Enum

func (x DataType) Enum() *DataType

func (DataType) EnumDescriptor deprecated

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

Deprecated: Use DataType.Descriptor instead.

func (DataType) Number

func (x DataType) Number() protoreflect.EnumNumber

func (DataType) String

func (x DataType) String() string

func (DataType) Type

type Id

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

func (*Id) Descriptor deprecated

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

Deprecated: Use Id.ProtoReflect.Descriptor instead.

func (*Id) GetName

func (x *Id) GetName() string

func (*Id) ProtoMessage

func (*Id) ProtoMessage()

func (*Id) ProtoReflect

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

func (*Id) Reset

func (x *Id) Reset()

func (*Id) String

func (x *Id) String() string

type ListSettingsRequest

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

func (*ListSettingsRequest) Descriptor deprecated

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

Deprecated: Use ListSettingsRequest.ProtoReflect.Descriptor instead.

func (*ListSettingsRequest) GetScope

func (x *ListSettingsRequest) GetScope() string

func (*ListSettingsRequest) ProtoMessage

func (*ListSettingsRequest) ProtoMessage()

func (*ListSettingsRequest) ProtoReflect

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

func (*ListSettingsRequest) Reset

func (x *ListSettingsRequest) Reset()

func (*ListSettingsRequest) String

func (x *ListSettingsRequest) String() string

type ListSettingsResponse

type ListSettingsResponse struct {
	Settings []*PreparedListSetting `protobuf:"bytes,1,rep,name=settings,proto3" json:"settings,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSettingsResponse) Descriptor deprecated

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

Deprecated: Use ListSettingsResponse.ProtoReflect.Descriptor instead.

func (*ListSettingsResponse) GetSettings

func (x *ListSettingsResponse) GetSettings() []*PreparedListSetting

func (*ListSettingsResponse) ProtoMessage

func (*ListSettingsResponse) ProtoMessage()

func (*ListSettingsResponse) ProtoReflect

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

func (*ListSettingsResponse) Reset

func (x *ListSettingsResponse) Reset()

func (*ListSettingsResponse) String

func (x *ListSettingsResponse) String() string

type PreparedListSetting

type PreparedListSetting struct {
	Name     string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Property *Property `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"`
	Value    string    `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Scope    string    `protobuf:"bytes,4,opt,name=scope,proto3" json:"scope,omitempty"`
	Group    string    `protobuf:"bytes,5,opt,name=group,proto3" json:"group,omitempty"`
	Weight   int64     `protobuf:"varint,6,opt,name=weight,proto3" json:"weight,omitempty"`
	// contains filtered or unexported fields
}

func (*PreparedListSetting) Descriptor deprecated

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

Deprecated: Use PreparedListSetting.ProtoReflect.Descriptor instead.

func (*PreparedListSetting) GetGroup

func (x *PreparedListSetting) GetGroup() string

func (*PreparedListSetting) GetName

func (x *PreparedListSetting) GetName() string

func (*PreparedListSetting) GetProperty

func (x *PreparedListSetting) GetProperty() *Property

func (*PreparedListSetting) GetScope

func (x *PreparedListSetting) GetScope() string

func (*PreparedListSetting) GetValue

func (x *PreparedListSetting) GetValue() string

func (*PreparedListSetting) GetWeight

func (x *PreparedListSetting) GetWeight() int64

func (*PreparedListSetting) ProtoMessage

func (*PreparedListSetting) ProtoMessage()

func (*PreparedListSetting) ProtoReflect

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

func (*PreparedListSetting) Reset

func (x *PreparedListSetting) Reset()

func (*PreparedListSetting) String

func (x *PreparedListSetting) String() string

type Property

type Property struct {
	DataType    DataType  `protobuf:"varint,1,opt,name=dataType,proto3,enum=setting.DataType" json:"dataType,omitempty"`
	ValueType   ValueType `protobuf:"varint,2,opt,name=valueType,proto3,enum=setting.ValueType" json:"valueType,omitempty"`
	DisplayName string    `protobuf:"bytes,3,opt,name=displayName,proto3" json:"displayName,omitempty"`
	// SettingValidation fields
	Required    bool                    `protobuf:"varint,4,opt,name=required,proto3" json:"required,omitempty"`
	Maximum     *wrapperspb.DoubleValue `protobuf:"bytes,5,opt,name=maximum,proto3" json:"maximum,omitempty"`
	Minimum     *wrapperspb.DoubleValue `protobuf:"bytes,6,opt,name=minimum,proto3" json:"minimum,omitempty"`
	MaxLength   *wrapperspb.Int64Value  `protobuf:"bytes,7,opt,name=maxLength,proto3" json:"maxLength,omitempty"`
	MinLength   *wrapperspb.Int64Value  `protobuf:"bytes,8,opt,name=minLength,proto3" json:"minLength,omitempty"`
	Format      *wrapperspb.StringValue `protobuf:"bytes,9,opt,name=format,proto3" json:"format,omitempty"`
	Pattern     *wrapperspb.StringValue `protobuf:"bytes,10,opt,name=pattern,proto3" json:"pattern,omitempty"`
	Enum        []string                `protobuf:"bytes,11,rep,name=enum,proto3" json:"enum,omitempty"`
	Default     *wrapperspb.StringValue `protobuf:"bytes,12,opt,name=default,proto3" json:"default,omitempty"`
	UniqueItems bool                    `protobuf:"varint,13,opt,name=uniqueItems,proto3" json:"uniqueItems,omitempty"`
	// contains filtered or unexported fields
}

func (*Property) Descriptor deprecated

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

Deprecated: Use Property.ProtoReflect.Descriptor instead.

func (*Property) GetDataType

func (x *Property) GetDataType() DataType

func (*Property) GetDefault

func (x *Property) GetDefault() *wrapperspb.StringValue

func (*Property) GetDisplayName

func (x *Property) GetDisplayName() string

func (*Property) GetEnum

func (x *Property) GetEnum() []string

func (*Property) GetFormat

func (x *Property) GetFormat() *wrapperspb.StringValue

func (*Property) GetMaxLength

func (x *Property) GetMaxLength() *wrapperspb.Int64Value

func (*Property) GetMaximum

func (x *Property) GetMaximum() *wrapperspb.DoubleValue

func (*Property) GetMinLength

func (x *Property) GetMinLength() *wrapperspb.Int64Value

func (*Property) GetMinimum

func (x *Property) GetMinimum() *wrapperspb.DoubleValue

func (*Property) GetPattern

func (x *Property) GetPattern() *wrapperspb.StringValue

func (*Property) GetRequired

func (x *Property) GetRequired() bool

func (*Property) GetUniqueItems

func (x *Property) GetUniqueItems() bool

func (*Property) GetValueType

func (x *Property) GetValueType() ValueType

func (*Property) ProtoMessage

func (*Property) ProtoMessage()

func (*Property) ProtoReflect

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

func (*Property) Reset

func (x *Property) Reset()

func (*Property) String

func (x *Property) String() string

type Scope

type Scope struct {
	Name        string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	DisplayName string `protobuf:"bytes,2,opt,name=displayName,proto3" json:"displayName,omitempty"`
	// contains filtered or unexported fields
}

func (*Scope) Descriptor deprecated

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

Deprecated: Use Scope.ProtoReflect.Descriptor instead.

func (*Scope) GetDisplayName

func (x *Scope) GetDisplayName() string

func (*Scope) GetName

func (x *Scope) GetName() string

func (*Scope) ProtoMessage

func (*Scope) ProtoMessage()

func (*Scope) ProtoReflect

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

func (*Scope) Reset

func (x *Scope) Reset()

func (*Scope) String

func (x *Scope) String() string

type Scopes

type Scopes struct {
	Scopes []*Scope `protobuf:"bytes,1,rep,name=scopes,proto3" json:"scopes,omitempty"`
	// contains filtered or unexported fields
}

func (*Scopes) Descriptor deprecated

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

Deprecated: Use Scopes.ProtoReflect.Descriptor instead.

func (*Scopes) GetScopes

func (x *Scopes) GetScopes() []*Scope

func (*Scopes) ProtoMessage

func (*Scopes) ProtoMessage()

func (*Scopes) ProtoReflect

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

func (*Scopes) Reset

func (x *Scopes) Reset()

func (*Scopes) String

func (x *Scopes) String() string

type Setting

type Setting struct {
	Name     string    `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
	Property *Property `protobuf:"bytes,2,opt,name=property,proto3" json:"property,omitempty"`
	Value    string    `protobuf:"bytes,3,opt,name=value,proto3" json:"value,omitempty"`
	Scope    string    `protobuf:"bytes,4,opt,name=scope,proto3" json:"scope,omitempty"`
	// contains filtered or unexported fields
}

func (*Setting) Descriptor deprecated

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

Deprecated: Use Setting.ProtoReflect.Descriptor instead.

func (*Setting) GetName

func (x *Setting) GetName() string

func (*Setting) GetProperty

func (x *Setting) GetProperty() *Property

func (*Setting) GetScope

func (x *Setting) GetScope() string

func (*Setting) GetValue

func (x *Setting) GetValue() string

func (*Setting) ProtoMessage

func (*Setting) ProtoMessage()

func (*Setting) ProtoReflect

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

func (*Setting) Reset

func (x *Setting) Reset()

func (*Setting) String

func (x *Setting) String() string

type SettingSvcClient

type SettingSvcClient interface {
	CreateSetting(ctx context.Context, in *CreateSettingRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetSetting(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Setting, error)
	GetSettingValue(ctx context.Context, in *Id, opts ...grpc.CallOption) (*SettingValue, error)
	UpdateSetting(ctx context.Context, in *Setting, opts ...grpc.CallOption) (*emptypb.Empty, error)
	// rpc DeleteSetting (Id) returns (google.protobuf.Empty); TODO
	ListSettings(ctx context.Context, in *ListSettingsRequest, opts ...grpc.CallOption) (*ListSettingsResponse, error)
	CreateScope(ctx context.Context, in *CreateScopeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
	GetScope(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Scope, error)
	ListScopes(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*Scopes, error)
}

SettingSvcClient is the client API for SettingSvc 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 NewSettingSvcClient

func NewSettingSvcClient(cc grpc.ClientConnInterface) SettingSvcClient

type SettingSvcServer

type SettingSvcServer interface {
	CreateSetting(context.Context, *CreateSettingRequest) (*emptypb.Empty, error)
	GetSetting(context.Context, *Id) (*Setting, error)
	GetSettingValue(context.Context, *Id) (*SettingValue, error)
	UpdateSetting(context.Context, *Setting) (*emptypb.Empty, error)
	// rpc DeleteSetting (Id) returns (google.protobuf.Empty); TODO
	ListSettings(context.Context, *ListSettingsRequest) (*ListSettingsResponse, error)
	CreateScope(context.Context, *CreateScopeRequest) (*emptypb.Empty, error)
	GetScope(context.Context, *Id) (*Scope, error)
	ListScopes(context.Context, *emptypb.Empty) (*Scopes, error)
	// contains filtered or unexported methods
}

SettingSvcServer is the server API for SettingSvc service. All implementations must embed UnimplementedSettingSvcServer for forward compatibility

type SettingValue

type SettingValue struct {

	// Types that are assignable to Value:
	//
	//	*SettingValue_BoolValue
	//	*SettingValue_StringValue
	//	*SettingValue_Int64Value
	//	*SettingValue_Float64Value
	Value isSettingValue_Value `protobuf_oneof:"value"`
	// contains filtered or unexported fields
}

func (*SettingValue) Descriptor deprecated

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

Deprecated: Use SettingValue.ProtoReflect.Descriptor instead.

func (*SettingValue) GetBoolValue

func (x *SettingValue) GetBoolValue() bool

func (*SettingValue) GetFloat64Value

func (x *SettingValue) GetFloat64Value() float64

func (*SettingValue) GetInt64Value

func (x *SettingValue) GetInt64Value() int64

func (*SettingValue) GetStringValue

func (x *SettingValue) GetStringValue() string

func (*SettingValue) GetValue

func (m *SettingValue) GetValue() isSettingValue_Value

func (*SettingValue) ProtoMessage

func (*SettingValue) ProtoMessage()

func (*SettingValue) ProtoReflect

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

func (*SettingValue) Reset

func (x *SettingValue) Reset()

func (*SettingValue) String

func (x *SettingValue) String() string

type SettingValue_BoolValue

type SettingValue_BoolValue struct {
	BoolValue bool `protobuf:"varint,1,opt,name=bool_value,json=boolValue,proto3,oneof"`
}

type SettingValue_Float64Value

type SettingValue_Float64Value struct {
	Float64Value float64 `protobuf:"fixed64,4,opt,name=float64_value,json=float64Value,proto3,oneof"`
}

type SettingValue_Int64Value

type SettingValue_Int64Value struct {
	Int64Value int64 `protobuf:"varint,3,opt,name=int64_value,json=int64Value,proto3,oneof"`
}

type SettingValue_StringValue

type SettingValue_StringValue struct {
	StringValue string `protobuf:"bytes,2,opt,name=string_value,json=stringValue,proto3,oneof"`
}

type UnimplementedSettingSvcServer

type UnimplementedSettingSvcServer struct {
}

UnimplementedSettingSvcServer must be embedded to have forward compatible implementations.

func (UnimplementedSettingSvcServer) CreateScope

func (UnimplementedSettingSvcServer) CreateSetting

func (UnimplementedSettingSvcServer) GetScope

func (UnimplementedSettingSvcServer) GetSetting

func (UnimplementedSettingSvcServer) GetSettingValue

func (UnimplementedSettingSvcServer) ListScopes

func (UnimplementedSettingSvcServer) ListSettings

func (UnimplementedSettingSvcServer) UpdateSetting

type UnsafeSettingSvcServer

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

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

type ValueType

type ValueType int32
const (
	ValueType_VALUE_TYPE_UNKNOWN ValueType = 0
	ValueType_VALUE_TYPE_SCALAR  ValueType = 1
	ValueType_VALUE_TYPE_ARRAY   ValueType = 2
	ValueType_VALUE_TYPE_MAP     ValueType = 3
)

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