settings

package
v1.0.50 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: MIT Imports: 25 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	Settings_GetSettings_FullMethodName    = "/configure.api.settings.Settings/GetSettings"
	Settings_UpdateSettings_FullMethodName = "/configure.api.settings.Settings/UpdateSettings"
)
View Source
const OperationSettingsGetSettings = "/configure.api.settings.Settings/GetSettings"
View Source
const OperationSettingsUpdateSettings = "/configure.api.settings.Settings/UpdateSettings"

Variables

View Source
var File_api_settings_proto_settings_proto protoreflect.FileDescriptor
View Source
var File_api_settings_proto_settings_service_proto protoreflect.FileDescriptor
View Source
var Settings_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "configure.api.settings.Settings",
	HandlerType: (*SettingsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "GetSettings",
			Handler:    _Settings_GetSettings_Handler,
		},
		{
			MethodName: "UpdateSettings",
			Handler:    _Settings_UpdateSettings_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "api/settings/proto/settings_service.proto",
}

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

Functions

func RegisterSettingsHTTPServer

func RegisterSettingsHTTPServer(s *http.Server, srv SettingsHTTPServer)

func RegisterSettingsServer

func RegisterSettingsServer(s grpc.ServiceRegistrar, srv SettingsServer)

Types

type GetSettingsRequest

type GetSettingsRequest struct {
	App   *string `protobuf:"bytes,1,opt,name=app,proto3,oneof" json:"app,omitempty"`
	EnvId uint32  `protobuf:"varint,2,opt,name=envId,proto3" json:"envId,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSettingsRequest) Descriptor deprecated

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

Deprecated: Use GetSettingsRequest.ProtoReflect.Descriptor instead.

func (*GetSettingsRequest) GetApp

func (x *GetSettingsRequest) GetApp() string

func (*GetSettingsRequest) GetEnvId

func (x *GetSettingsRequest) GetEnvId() uint32

func (*GetSettingsRequest) ProtoMessage

func (*GetSettingsRequest) ProtoMessage()

func (*GetSettingsRequest) ProtoReflect

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

func (*GetSettingsRequest) Reset

func (x *GetSettingsRequest) Reset()

func (*GetSettingsRequest) String

func (x *GetSettingsRequest) String() string

func (*GetSettingsRequest) Validate

func (m *GetSettingsRequest) Validate() error

Validate checks the field values on GetSettingsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetSettingsRequest) ValidateAll

func (m *GetSettingsRequest) ValidateAll() error

ValidateAll checks the field values on GetSettingsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetSettingsRequestMultiError, or nil if none found.

type GetSettingsRequestMultiError

type GetSettingsRequestMultiError []error

GetSettingsRequestMultiError is an error wrapping multiple validation errors returned by GetSettingsRequest.ValidateAll() if the designated constraints aren't met.

func (GetSettingsRequestMultiError) AllErrors

func (m GetSettingsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetSettingsRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetSettingsRequestValidationError

type GetSettingsRequestValidationError struct {
	// contains filtered or unexported fields
}

GetSettingsRequestValidationError is the validation error returned by GetSettingsRequest.Validate if the designated constraints aren't met.

func (GetSettingsRequestValidationError) Cause

Cause function returns cause value.

func (GetSettingsRequestValidationError) Error

Error satisfies the builtin error interface

func (GetSettingsRequestValidationError) ErrorName

ErrorName returns error name.

func (GetSettingsRequestValidationError) Field

Field function returns field value.

func (GetSettingsRequestValidationError) Key

Key function returns key value.

func (GetSettingsRequestValidationError) Reason

Reason function returns reason value.

type GetSettingsResponse

type GetSettingsResponse struct {
	App    string          `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
	EnvId  uint32          `protobuf:"varint,2,opt,name=envId,proto3" json:"envId,omitempty"`
	Format string          `protobuf:"bytes,3,opt,name=format,proto3" json:"format,omitempty"` // 当前模板格式(json | yaml)
	Items  []*SettingsItem `protobuf:"bytes,4,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*GetSettingsResponse) Descriptor deprecated

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

Deprecated: Use GetSettingsResponse.ProtoReflect.Descriptor instead.

func (*GetSettingsResponse) GetApp

func (x *GetSettingsResponse) GetApp() string

func (*GetSettingsResponse) GetEnvId

func (x *GetSettingsResponse) GetEnvId() uint32

func (*GetSettingsResponse) GetFormat

func (x *GetSettingsResponse) GetFormat() string

func (*GetSettingsResponse) GetItems

func (x *GetSettingsResponse) GetItems() []*SettingsItem

func (*GetSettingsResponse) ProtoMessage

func (*GetSettingsResponse) ProtoMessage()

func (*GetSettingsResponse) ProtoReflect

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

func (*GetSettingsResponse) Reset

func (x *GetSettingsResponse) Reset()

func (*GetSettingsResponse) String

func (x *GetSettingsResponse) String() string

func (*GetSettingsResponse) Validate

func (m *GetSettingsResponse) Validate() error

Validate checks the field values on GetSettingsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*GetSettingsResponse) ValidateAll

func (m *GetSettingsResponse) ValidateAll() error

ValidateAll checks the field values on GetSettingsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in GetSettingsResponseMultiError, or nil if none found.

type GetSettingsResponseMultiError

type GetSettingsResponseMultiError []error

GetSettingsResponseMultiError is an error wrapping multiple validation errors returned by GetSettingsResponse.ValidateAll() if the designated constraints aren't met.

func (GetSettingsResponseMultiError) AllErrors

func (m GetSettingsResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (GetSettingsResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type GetSettingsResponseValidationError

type GetSettingsResponseValidationError struct {
	// contains filtered or unexported fields
}

GetSettingsResponseValidationError is the validation error returned by GetSettingsResponse.Validate if the designated constraints aren't met.

func (GetSettingsResponseValidationError) Cause

Cause function returns cause value.

func (GetSettingsResponseValidationError) Error

Error satisfies the builtin error interface

func (GetSettingsResponseValidationError) ErrorName

ErrorName returns error name.

func (GetSettingsResponseValidationError) Field

Field function returns field value.

func (GetSettingsResponseValidationError) Key

Key function returns key value.

func (GetSettingsResponseValidationError) Reason

Reason function returns reason value.

type SettingsClient

type SettingsClient interface {
	// GetSettings 获取系统配置(当前模板引用的业务变量 + 指定环境的值)
	GetSettings(ctx context.Context, in *GetSettingsRequest, opts ...grpc.CallOption) (*GetSettingsResponse, error)
	// UpdateSettings 保存系统配置(类型校验 + 落库 + 重新渲染 + 广播,保存即生效)
	UpdateSettings(ctx context.Context, in *UpdateSettingsRequest, opts ...grpc.CallOption) (*UpdateSettingsResponse, error)
}

SettingsClient is the client API for Settings 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 NewSettingsClient

func NewSettingsClient(cc grpc.ClientConnInterface) SettingsClient

type SettingsHTTPClient

type SettingsHTTPClient interface {
	GetSettings(ctx context.Context, req *GetSettingsRequest, opts ...http.CallOption) (rsp *GetSettingsResponse, err error)
	UpdateSettings(ctx context.Context, req *UpdateSettingsRequest, opts ...http.CallOption) (rsp *UpdateSettingsResponse, err error)
}

func NewSettingsHTTPClient

func NewSettingsHTTPClient(client *http.Client) SettingsHTTPClient

type SettingsHTTPClientImpl

type SettingsHTTPClientImpl struct {
	// contains filtered or unexported fields
}

func (*SettingsHTTPClientImpl) GetSettings

func (*SettingsHTTPClientImpl) UpdateSettings

type SettingsHTTPServer

type SettingsHTTPServer interface {
	// GetSettings GetSettings 获取系统配置(当前模板引用的业务变量 + 指定环境的值)
	GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error)
	// UpdateSettings UpdateSettings 保存系统配置(类型校验 + 落库 + 重新渲染 + 广播,保存即生效)
	UpdateSettings(context.Context, *UpdateSettingsRequest) (*UpdateSettingsResponse, error)
}

type SettingsItem

type SettingsItem struct {
	Keyword     string `protobuf:"bytes,1,opt,name=keyword,proto3" json:"keyword,omitempty"`         // 变量 key(对应模板 ${keyword})
	Type        string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`               // 值类型:string | text | int | float | bool | enum | object | array
	Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` // 变量说明
	Extra       string `protobuf:"bytes,4,opt,name=extra,proto3" json:"extra,omitempty"`             // 渲染元数据(JSON 字符串,见业务变量 extra)
	Value       string `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`             // 当前值(原始字符串;未设置 = 空)
	// contains filtered or unexported fields
}

func (*SettingsItem) Descriptor deprecated

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

Deprecated: Use SettingsItem.ProtoReflect.Descriptor instead.

func (*SettingsItem) GetDescription

func (x *SettingsItem) GetDescription() string

func (*SettingsItem) GetExtra

func (x *SettingsItem) GetExtra() string

func (*SettingsItem) GetKeyword

func (x *SettingsItem) GetKeyword() string

func (*SettingsItem) GetType

func (x *SettingsItem) GetType() string

func (*SettingsItem) GetValue

func (x *SettingsItem) GetValue() string

func (*SettingsItem) ProtoMessage

func (*SettingsItem) ProtoMessage()

func (*SettingsItem) ProtoReflect

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

func (*SettingsItem) Reset

func (x *SettingsItem) Reset()

func (*SettingsItem) String

func (x *SettingsItem) String() string

func (*SettingsItem) Validate

func (m *SettingsItem) Validate() error

Validate checks the field values on SettingsItem with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*SettingsItem) ValidateAll

func (m *SettingsItem) ValidateAll() error

ValidateAll checks the field values on SettingsItem with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in SettingsItemMultiError, or nil if none found.

type SettingsItemMultiError

type SettingsItemMultiError []error

SettingsItemMultiError is an error wrapping multiple validation errors returned by SettingsItem.ValidateAll() if the designated constraints aren't met.

func (SettingsItemMultiError) AllErrors

func (m SettingsItemMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (SettingsItemMultiError) Error

func (m SettingsItemMultiError) Error() string

Error returns a concatenation of all the error messages it wraps.

type SettingsItemValidationError

type SettingsItemValidationError struct {
	// contains filtered or unexported fields
}

SettingsItemValidationError is the validation error returned by SettingsItem.Validate if the designated constraints aren't met.

func (SettingsItemValidationError) Cause

Cause function returns cause value.

func (SettingsItemValidationError) Error

Error satisfies the builtin error interface

func (SettingsItemValidationError) ErrorName

func (e SettingsItemValidationError) ErrorName() string

ErrorName returns error name.

func (SettingsItemValidationError) Field

Field function returns field value.

func (SettingsItemValidationError) Key

Key function returns key value.

func (SettingsItemValidationError) Reason

Reason function returns reason value.

type SettingsServer

type SettingsServer interface {
	// GetSettings 获取系统配置(当前模板引用的业务变量 + 指定环境的值)
	GetSettings(context.Context, *GetSettingsRequest) (*GetSettingsResponse, error)
	// UpdateSettings 保存系统配置(类型校验 + 落库 + 重新渲染 + 广播,保存即生效)
	UpdateSettings(context.Context, *UpdateSettingsRequest) (*UpdateSettingsResponse, error)
	// contains filtered or unexported methods
}

SettingsServer is the server API for Settings service. All implementations must embed UnimplementedSettingsServer for forward compatibility.

type UnimplementedSettingsServer

type UnimplementedSettingsServer struct{}

UnimplementedSettingsServer must be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedSettingsServer) GetSettings

func (UnimplementedSettingsServer) UpdateSettings

type UnsafeSettingsServer

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

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

type UpdateSettingsRequest

type UpdateSettingsRequest struct {
	App   *string                            `protobuf:"bytes,1,opt,name=app,proto3,oneof" json:"app,omitempty"`
	EnvId uint32                             `protobuf:"varint,2,opt,name=envId,proto3" json:"envId,omitempty"`
	Items []*UpdateSettingsRequest_ValueItem `protobuf:"bytes,3,rep,name=items,proto3" json:"items,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateSettingsRequest) Descriptor deprecated

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

Deprecated: Use UpdateSettingsRequest.ProtoReflect.Descriptor instead.

func (*UpdateSettingsRequest) GetApp

func (x *UpdateSettingsRequest) GetApp() string

func (*UpdateSettingsRequest) GetEnvId

func (x *UpdateSettingsRequest) GetEnvId() uint32

func (*UpdateSettingsRequest) GetItems

func (*UpdateSettingsRequest) ProtoMessage

func (*UpdateSettingsRequest) ProtoMessage()

func (*UpdateSettingsRequest) ProtoReflect

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

func (*UpdateSettingsRequest) Reset

func (x *UpdateSettingsRequest) Reset()

func (*UpdateSettingsRequest) String

func (x *UpdateSettingsRequest) String() string

func (*UpdateSettingsRequest) Validate

func (m *UpdateSettingsRequest) Validate() error

Validate checks the field values on UpdateSettingsRequest with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateSettingsRequest) ValidateAll

func (m *UpdateSettingsRequest) ValidateAll() error

ValidateAll checks the field values on UpdateSettingsRequest with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateSettingsRequestMultiError, or nil if none found.

type UpdateSettingsRequestMultiError

type UpdateSettingsRequestMultiError []error

UpdateSettingsRequestMultiError is an error wrapping multiple validation errors returned by UpdateSettingsRequest.ValidateAll() if the designated constraints aren't met.

func (UpdateSettingsRequestMultiError) AllErrors

func (m UpdateSettingsRequestMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateSettingsRequestMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UpdateSettingsRequestValidationError

type UpdateSettingsRequestValidationError struct {
	// contains filtered or unexported fields
}

UpdateSettingsRequestValidationError is the validation error returned by UpdateSettingsRequest.Validate if the designated constraints aren't met.

func (UpdateSettingsRequestValidationError) Cause

Cause function returns cause value.

func (UpdateSettingsRequestValidationError) Error

Error satisfies the builtin error interface

func (UpdateSettingsRequestValidationError) ErrorName

ErrorName returns error name.

func (UpdateSettingsRequestValidationError) Field

Field function returns field value.

func (UpdateSettingsRequestValidationError) Key

Key function returns key value.

func (UpdateSettingsRequestValidationError) Reason

Reason function returns reason value.

type UpdateSettingsRequest_ValueItem

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

func (*UpdateSettingsRequest_ValueItem) Descriptor deprecated

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

Deprecated: Use UpdateSettingsRequest_ValueItem.ProtoReflect.Descriptor instead.

func (*UpdateSettingsRequest_ValueItem) GetKeyword

func (x *UpdateSettingsRequest_ValueItem) GetKeyword() string

func (*UpdateSettingsRequest_ValueItem) GetValue

func (*UpdateSettingsRequest_ValueItem) ProtoMessage

func (*UpdateSettingsRequest_ValueItem) ProtoMessage()

func (*UpdateSettingsRequest_ValueItem) ProtoReflect

func (*UpdateSettingsRequest_ValueItem) Reset

func (*UpdateSettingsRequest_ValueItem) String

func (*UpdateSettingsRequest_ValueItem) Validate

func (m *UpdateSettingsRequest_ValueItem) Validate() error

Validate checks the field values on UpdateSettingsRequest_ValueItem with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateSettingsRequest_ValueItem) ValidateAll

func (m *UpdateSettingsRequest_ValueItem) ValidateAll() error

ValidateAll checks the field values on UpdateSettingsRequest_ValueItem with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateSettingsRequest_ValueItemMultiError, or nil if none found.

type UpdateSettingsRequest_ValueItemMultiError

type UpdateSettingsRequest_ValueItemMultiError []error

UpdateSettingsRequest_ValueItemMultiError is an error wrapping multiple validation errors returned by UpdateSettingsRequest_ValueItem.ValidateAll() if the designated constraints aren't met.

func (UpdateSettingsRequest_ValueItemMultiError) AllErrors

AllErrors returns a list of validation violation errors.

func (UpdateSettingsRequest_ValueItemMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UpdateSettingsRequest_ValueItemValidationError

type UpdateSettingsRequest_ValueItemValidationError struct {
	// contains filtered or unexported fields
}

UpdateSettingsRequest_ValueItemValidationError is the validation error returned by UpdateSettingsRequest_ValueItem.Validate if the designated constraints aren't met.

func (UpdateSettingsRequest_ValueItemValidationError) Cause

Cause function returns cause value.

func (UpdateSettingsRequest_ValueItemValidationError) Error

Error satisfies the builtin error interface

func (UpdateSettingsRequest_ValueItemValidationError) ErrorName

ErrorName returns error name.

func (UpdateSettingsRequest_ValueItemValidationError) Field

Field function returns field value.

func (UpdateSettingsRequest_ValueItemValidationError) Key

Key function returns key value.

func (UpdateSettingsRequest_ValueItemValidationError) Reason

Reason function returns reason value.

type UpdateSettingsResponse

type UpdateSettingsResponse struct {
	// contains filtered or unexported fields
}

func (*UpdateSettingsResponse) Descriptor deprecated

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

Deprecated: Use UpdateSettingsResponse.ProtoReflect.Descriptor instead.

func (*UpdateSettingsResponse) ProtoMessage

func (*UpdateSettingsResponse) ProtoMessage()

func (*UpdateSettingsResponse) ProtoReflect

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

func (*UpdateSettingsResponse) Reset

func (x *UpdateSettingsResponse) Reset()

func (*UpdateSettingsResponse) String

func (x *UpdateSettingsResponse) String() string

func (*UpdateSettingsResponse) Validate

func (m *UpdateSettingsResponse) Validate() error

Validate checks the field values on UpdateSettingsResponse with the rules defined in the proto definition for this message. If any rules are violated, the first error encountered is returned, or nil if there are no violations.

func (*UpdateSettingsResponse) ValidateAll

func (m *UpdateSettingsResponse) ValidateAll() error

ValidateAll checks the field values on UpdateSettingsResponse with the rules defined in the proto definition for this message. If any rules are violated, the result is a list of violation errors wrapped in UpdateSettingsResponseMultiError, or nil if none found.

type UpdateSettingsResponseMultiError

type UpdateSettingsResponseMultiError []error

UpdateSettingsResponseMultiError is an error wrapping multiple validation errors returned by UpdateSettingsResponse.ValidateAll() if the designated constraints aren't met.

func (UpdateSettingsResponseMultiError) AllErrors

func (m UpdateSettingsResponseMultiError) AllErrors() []error

AllErrors returns a list of validation violation errors.

func (UpdateSettingsResponseMultiError) Error

Error returns a concatenation of all the error messages it wraps.

type UpdateSettingsResponseValidationError

type UpdateSettingsResponseValidationError struct {
	// contains filtered or unexported fields
}

UpdateSettingsResponseValidationError is the validation error returned by UpdateSettingsResponse.Validate if the designated constraints aren't met.

func (UpdateSettingsResponseValidationError) Cause

Cause function returns cause value.

func (UpdateSettingsResponseValidationError) Error

Error satisfies the builtin error interface

func (UpdateSettingsResponseValidationError) ErrorName

ErrorName returns error name.

func (UpdateSettingsResponseValidationError) Field

Field function returns field value.

func (UpdateSettingsResponseValidationError) Key

Key function returns key value.

func (UpdateSettingsResponseValidationError) Reason

Reason function returns reason value.

Jump to

Keyboard shortcuts

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