Documentation
¶
Index ¶
- Constants
- Variables
- func ExtractPureKey(key string) string
- func FromStatus(err error) error
- func GenAclPolicyKey() string
- func GenAppDirKey() string
- func GenAppElementEnvKey(app, env string) string
- func GenAppElementKey(app string) string
- func GenAppEnvOperationKey(app, env string) string
- func GenAppKey(app string) string
- func GenAppOperationKey(app string) string
- func GenElementKey(app, env, key string) string
- func GenElementOperationDirKey(app, env, key string) string
- func GenElementOperationKey(app, env, key string, operatedAt int64) string
- func GenElementOperationKeyPrefix(app, env, key string) string
- func GenInstanceNormalDirKey() string
- func GenInstanceNormalKey(insId string) string
- func GenInstanceReversedKey(app, env, key string) string
- func GenInstanceReversedKeyWithInsId(app, env, key string, insId string) string
- func GenUserDirKey() string
- func GenUserKey(account string) string
- func MarshalProto(v proto.Message) ([]byte, error)
- func New(code Code, msg string) error
- func OperatorFromContext(ctx context.Context) string
- func ToStatus(err error) error
- func UnmarshalProto(data []byte, v proto.Message) error
- func WithAgentPrefix(agentId string) string
- func WithMetadataSuffix(key string) string
- func WithOperator(ctx context.Context, operator string) context.Context
- func WithVersion(key string, version int) string
- type AdmAggregate
- type AgentAggregate
- type AgentHybrid
- type AgentInstance
- func (*AgentInstance) Descriptor() ([]byte, []int)deprecated
- func (x *AgentInstance) GetAddr() string
- func (x *AgentInstance) GetAgentId() string
- func (x *AgentInstance) GetAnnotations() map[string]string
- func (*AgentInstance) ProtoMessage()
- func (x *AgentInstance) ProtoReflect() protoreflect.Message
- func (x *AgentInstance) Reset()
- func (x *AgentInstance) String() string
- func (m *AgentInstance) Validate() error
- func (m *AgentInstance) ValidateAll() error
- type AgentInstanceChange
- func (*AgentInstanceChange) Descriptor() ([]byte, []int)deprecated
- func (x *AgentInstanceChange) GetIns() *AgentInstance
- func (x *AgentInstanceChange) GetOp() ChangeOp
- func (*AgentInstanceChange) ProtoMessage()
- func (x *AgentInstanceChange) ProtoReflect() protoreflect.Message
- func (x *AgentInstanceChange) Reset()
- func (x *AgentInstanceChange) String() string
- func (m *AgentInstanceChange) Validate() error
- func (m *AgentInstanceChange) ValidateAll() error
- type AgentInstanceChangeMultiError
- type AgentInstanceChangeValidationError
- func (e AgentInstanceChangeValidationError) Cause() error
- func (e AgentInstanceChangeValidationError) Error() string
- func (e AgentInstanceChangeValidationError) ErrorName() string
- func (e AgentInstanceChangeValidationError) Field() string
- func (e AgentInstanceChangeValidationError) Key() bool
- func (e AgentInstanceChangeValidationError) Reason() string
- type AgentInstanceMultiError
- type AgentInstanceValidationError
- func (e AgentInstanceValidationError) Cause() error
- func (e AgentInstanceValidationError) Error() string
- func (e AgentInstanceValidationError) ErrorName() string
- func (e AgentInstanceValidationError) Field() string
- func (e AgentInstanceValidationError) Key() bool
- func (e AgentInstanceValidationError) Reason() string
- type AppMetadata
- func (*AppMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *AppMetadata) GetCreatedAt() int64
- func (x *AppMetadata) GetCreator() string
- func (x *AppMetadata) GetDescription() string
- func (x *AppMetadata) GetId() string
- func (x *AppMetadata) GetOwner() string
- func (x *AppMetadata) GetSecrets() map[string]string
- func (x *AppMetadata) GetStatus() AppMetadata_Status
- func (*AppMetadata) ProtoMessage()
- func (x *AppMetadata) ProtoReflect() protoreflect.Message
- func (x *AppMetadata) Reset()
- func (x *AppMetadata) String() string
- func (m *AppMetadata) Validate() error
- func (m *AppMetadata) ValidateAll() error
- type AppMetadataMultiError
- type AppMetadataValidationError
- func (e AppMetadataValidationError) Cause() error
- func (e AppMetadataValidationError) Error() string
- func (e AppMetadataValidationError) ErrorName() string
- func (e AppMetadataValidationError) Field() string
- func (e AppMetadataValidationError) Key() bool
- func (e AppMetadataValidationError) Reason() string
- type AppMetadata_Status
- func (AppMetadata_Status) Descriptor() protoreflect.EnumDescriptor
- func (x AppMetadata_Status) Enum() *AppMetadata_Status
- func (AppMetadata_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x AppMetadata_Status) Number() protoreflect.EnumNumber
- func (x AppMetadata_Status) String() string
- func (AppMetadata_Status) Type() protoreflect.EnumType
- type Casbin
- func (*Casbin) Descriptor() ([]byte, []int)deprecated
- func (x *Casbin) GetPolicies() []*Casbin_Policy
- func (*Casbin) ProtoMessage()
- func (x *Casbin) ProtoReflect() protoreflect.Message
- func (x *Casbin) Reset()
- func (x *Casbin) String() string
- func (m *Casbin) Validate() error
- func (m *Casbin) ValidateAll() error
- type CasbinMultiError
- type CasbinValidationError
- type Casbin_Policy
- func (*Casbin_Policy) Descriptor() ([]byte, []int)deprecated
- func (x *Casbin_Policy) GetPtype() string
- func (x *Casbin_Policy) GetV0() string
- func (x *Casbin_Policy) GetV1() string
- func (x *Casbin_Policy) GetV2() string
- func (x *Casbin_Policy) GetV3() string
- func (x *Casbin_Policy) GetV4() string
- func (x *Casbin_Policy) GetV5() string
- func (*Casbin_Policy) ProtoMessage()
- func (x *Casbin_Policy) ProtoReflect() protoreflect.Message
- func (x *Casbin_Policy) Reset()
- func (x *Casbin_Policy) String() string
- func (m *Casbin_Policy) Validate() error
- func (m *Casbin_Policy) ValidateAll() error
- type Casbin_PolicyMultiError
- type Casbin_PolicyValidationError
- func (e Casbin_PolicyValidationError) Cause() error
- func (e Casbin_PolicyValidationError) Error() string
- func (e Casbin_PolicyValidationError) ErrorName() string
- func (e Casbin_PolicyValidationError) Field() string
- func (e Casbin_PolicyValidationError) Key() bool
- func (e Casbin_PolicyValidationError) Reason() string
- type Change
- type ChangeOp
- type ChangeType
- type Code
- type CommonPager
- type ContentType
- func (ContentType) Descriptor() protoreflect.EnumDescriptor
- func (x ContentType) Enum() *ContentType
- func (ContentType) EnumDescriptor() ([]byte, []int)deprecated
- func (x ContentType) Number() protoreflect.EnumNumber
- func (x ContentType) String() string
- func (ContentType) Type() protoreflect.EnumType
- type Element
- func (*Element) Descriptor() ([]byte, []int)deprecated
- func (x *Element) GetMetadata() *ElementMetadata
- func (x *Element) GetPublished() bool
- func (x *Element) GetRaw() []byte
- func (x *Element) GetVersion() int32
- func (m *Element) MarshalJSON() ([]byte, error)
- func (*Element) ProtoMessage()
- func (x *Element) ProtoReflect() protoreflect.Message
- func (x *Element) Reset()
- func (x *Element) String() string
- func (m *Element) Validate() error
- func (m *Element) ValidateAll() error
- type ElementMetadata
- func (*ElementMetadata) Descriptor() ([]byte, []int)deprecated
- func (x *ElementMetadata) GetApp() string
- func (x *ElementMetadata) GetContentType() ContentType
- func (x *ElementMetadata) GetEnv() string
- func (x *ElementMetadata) GetKey() string
- func (x *ElementMetadata) GetLatestVersion() int32
- func (x *ElementMetadata) GetUnpublishedVersion() int32
- func (x *ElementMetadata) GetUsingFingerprint() string
- func (x *ElementMetadata) GetUsingVersion() int32
- func (m *ElementMetadata) MarshalJSON() ([]byte, error)
- func (*ElementMetadata) ProtoMessage()
- func (x *ElementMetadata) ProtoReflect() protoreflect.Message
- func (x *ElementMetadata) Reset()
- func (x *ElementMetadata) String() string
- func (m *ElementMetadata) Validate() error
- func (m *ElementMetadata) ValidateAll() error
- type ElementMetadataMultiError
- type ElementMetadataValidationError
- func (e ElementMetadataValidationError) Cause() error
- func (e ElementMetadataValidationError) Error() string
- func (e ElementMetadataValidationError) ErrorName() string
- func (e ElementMetadataValidationError) Field() string
- func (e ElementMetadataValidationError) Key() bool
- func (e ElementMetadataValidationError) Reason() string
- type ElementMultiError
- type ElementOperation
- func (*ElementOperation) Descriptor() ([]byte, []int)deprecated
- func (x *ElementOperation) GetCurrentVersion() int32
- func (x *ElementOperation) GetLastVersion() int32
- func (x *ElementOperation) GetOp() ElementOperation_Op
- func (x *ElementOperation) GetOperatedAt() int64
- func (x *ElementOperation) GetOperatedKey() string
- func (x *ElementOperation) GetOperator() string
- func (x *ElementOperation) GetRemark() string
- func (*ElementOperation) ProtoMessage()
- func (x *ElementOperation) ProtoReflect() protoreflect.Message
- func (x *ElementOperation) Reset()
- func (x *ElementOperation) String() string
- func (m *ElementOperation) Validate() error
- func (m *ElementOperation) ValidateAll() error
- type ElementOperationMultiError
- type ElementOperationValidationError
- func (e ElementOperationValidationError) Cause() error
- func (e ElementOperationValidationError) Error() string
- func (e ElementOperationValidationError) ErrorName() string
- func (e ElementOperationValidationError) Field() string
- func (e ElementOperationValidationError) Key() bool
- func (e ElementOperationValidationError) Reason() string
- type ElementOperation_Op
- func (ElementOperation_Op) Descriptor() protoreflect.EnumDescriptor
- func (x ElementOperation_Op) Enum() *ElementOperation_Op
- func (ElementOperation_Op) EnumDescriptor() ([]byte, []int)deprecated
- func (x ElementOperation_Op) Number() protoreflect.EnumNumber
- func (x ElementOperation_Op) String() string
- func (ElementOperation_Op) Type() protoreflect.EnumType
- type ElementValidationError
- type Error
- type GetAgentsResult
- type GetAppEnvsResult
- type GetAppsResult
- type GetElementOperationsResult
- type GetElementsResult
- type GetInstancesResult
- type GetUsersResult
- type Instance
- func (*Instance) Descriptor() ([]byte, []int)deprecated
- func (x *Instance) GetAgentId() string
- func (x *Instance) GetClientId() string
- func (x *Instance) GetClientIp() string
- func (x *Instance) GetLastRenewTimestamp() int64
- func (x *Instance) GetWatching() []*Instance_Watching
- func (m *Instance) Id() string
- func (*Instance) ProtoMessage()
- func (x *Instance) ProtoReflect() protoreflect.Message
- func (x *Instance) Reset()
- func (x *Instance) String() string
- func (m *Instance) Validate() error
- func (m *Instance) ValidateAll() error
- type InstanceHybrid
- type InstanceMultiError
- type InstanceValidationError
- type Instance_Watching
- func (*Instance_Watching) Descriptor() ([]byte, []int)deprecated
- func (x *Instance_Watching) GetApp() string
- func (x *Instance_Watching) GetEnv() string
- func (x *Instance_Watching) GetWatchKeys() []string
- func (*Instance_Watching) ProtoMessage()
- func (x *Instance_Watching) ProtoReflect() protoreflect.Message
- func (x *Instance_Watching) Reset()
- func (x *Instance_Watching) String() string
- func (m *Instance_Watching) Validate() error
- func (m *Instance_Watching) ValidateAll() error
- type Instance_WatchingMultiError
- type Instance_WatchingValidationError
- func (e Instance_WatchingValidationError) Cause() error
- func (e Instance_WatchingValidationError) Error() string
- func (e Instance_WatchingValidationError) ErrorName() string
- func (e Instance_WatchingValidationError) Field() string
- func (e Instance_WatchingValidationError) Key() bool
- func (e Instance_WatchingValidationError) Reason() string
- type KVReadOnly
- type KVWriteOnly
- type PublishingMode
- type RBAC
- type RoleBinding
- type User
- func (*User) Descriptor() ([]byte, []int)deprecated
- func (x *User) GetAccount() string
- func (x *User) GetHashedPassword() string
- func (x *User) GetNickname() string
- func (x *User) GetSalt() string
- func (x *User) GetStatus() User_Status
- func (*User) ProtoMessage()
- func (x *User) ProtoReflect() protoreflect.Message
- func (x *User) Reset()
- func (x *User) String() string
- func (m *User) Validate() error
- func (m *User) ValidateAll() error
- type UserMultiError
- type UserValidationError
- type User_Status
- func (User_Status) Descriptor() protoreflect.EnumDescriptor
- func (x User_Status) Enum() *User_Status
- func (User_Status) EnumDescriptor() ([]byte, []int)deprecated
- func (x User_Status) Number() protoreflect.EnumNumber
- func (x User_Status) String() string
- func (User_Status) Type() protoreflect.EnumType
Constants ¶
const ( Code_OK = Code(codes.OK) Code_CANCELLED = Code(codes.Canceled) Code_UNKNOWN = Code(codes.Unknown) Code_INVALID_ARGUMENT = Code(codes.InvalidArgument) Code_DEADLINE_EXCEEDED = Code(codes.DeadlineExceeded) Code_NOT_FOUND = Code(codes.NotFound) Code_ALREADY_EXISTS = Code(codes.AlreadyExists) Code_PERMISSION_DENIED = Code(codes.PermissionDenied) Code_RESOURCE_EXHAUSTED = Code(codes.ResourceExhausted) Code_FAILED_PRECONDITION = Code(codes.FailedPrecondition) Code_ABORTED = Code(codes.Aborted) Code_OUT_OF_RANGE = Code(codes.OutOfRange) Code_UNIMPLEMENTED = Code(codes.Unimplemented) Code_INTERNAL = Code(codes.Internal) Code_UNAVAILABLE = Code(codes.Unavailable) Code_DATA_LOSS = Code(codes.DataLoss) Code_UNAUTHENTICATED = Code(codes.Unauthenticated) )
const ( Action_READ = "r" Action_WRITE = "w" Action_DELETE = "d" Action_PUBLISH = "p" Action_ANY = "*" )
RBAC action constants
const ( Domain_ALL = "*" Domain_CLUSTER = "cluster" // Domain_APP MUST NOT be used, this only represents the format of // app domain. Domain_APP = "app/env" )
RBAC domain constants
const ( // Role_SUPERADMIN can control whole resources. // p superadmin * * * Role_SUPERADMIN = "superadmin" // Role_ADMIN is an admin role who owns all apps' all permissions. Role_ADMIN = "admin" // Role_APPOWNER can only control the app's resources which belong to him // and visit other apps's resources. Role_APPOWNER = "appowner" // Role_DEVELOPER can only access(except delete, publish, rollback permissions) // the app's resources which belong to him and visit other apps's resources. Role_DEVELOPER = "appdeveloper" // Role_VISITOR can only access(readonly) app's resources. Role_VISITOR = "visitor" )
RBAC role constants
const ( Object_USER = "user" Object_ACL = "acl" Object_APP = "app" Object_ENV = "env" Object_ELEMENT = "elem" Object_CLUSTER = "cluster" Object_ALL = "*" )
RBAC object constants
Variables ¶
var ( User_Status_name = map[int32]string{ 0: "NORMAL", 1: "FORBIDDEN", } User_Status_value = map[string]int32{ "NORMAL": 0, "FORBIDDEN": 1, } )
Enum value maps for User_Status.
var ( Err_CANCELLED = New(Code_CANCELLED, "CANCELLED") Err_UNKNOWN = New(Code_UNKNOWN, "UNKNOWN") Err_INVALID_ARGUMENT = New(Code_INVALID_ARGUMENT, "INVALID_ARGUMENT") Err_DEADLINE_EXCEEDED = New(Code_DEADLINE_EXCEEDED, "DEADLINE_EXCEEDED") Err_NOT_FOUND = New(Code_NOT_FOUND, "NOT_FOUND") Err_ALREADY_EXISTS = New(Code_ALREADY_EXISTS, "ALREADY_EXISTS") Err_PERMISSION_DENIED = New(Code_PERMISSION_DENIED, "PERMISSION_DENIED") Err_RESOURCE_EXHAUSTED = New(Code_RESOURCE_EXHAUSTED, "RESOURCE_EXHAUSTED") Err_FAILED_PRECONDITION = New(Code_FAILED_PRECONDITION, "FAILED_PRECONDITION") Err_ABORTED = New(Code_ABORTED, "ABORTED") Err_OUT_OF_RANGE = New(Code_OUT_OF_RANGE, "OUT_OF_RANGE") Err_UNIMPLEMENTED = New(Code_UNIMPLEMENTED, "UNIMPLEMENTED") Err_INTERNAL = New(Code_INTERNAL, "INTERNAL") Err_UNAVAILABLE = New(Code_UNAVAILABLE, "UNAVAILABLE") Err_DATA_LOSS = New(Code_DATA_LOSS, "DATA_LOSS") Err_UNAUTHENTICATED = New(Code_UNAUTHENTICATED, "UNAUTHENTICATED") )
var ( ContentType_name = map[int32]string{ 0: "UNKNOWN", 1: "JSON", 2: "TOML", 3: "INI", 4: "PLAINTEXT", } ContentType_value = map[string]int32{ "UNKNOWN": 0, "JSON": 1, "TOML": 2, "INI": 3, "PLAINTEXT": 4, } )
Enum value maps for ContentType.
var ( ChangeType_name = map[int32]string{ 0: "CHANGE_TYPE_UNKNOWN", 1: "KV", 2: "DIR", } ChangeType_value = map[string]int32{ "CHANGE_TYPE_UNKNOWN": 0, "KV": 1, "DIR": 2, } )
Enum value maps for ChangeType.
var ( ChangeOp_name = map[int32]string{ 0: "UNDEFINED", 1: "NEW", 2: "UPDATE", 3: "DELETE", } ChangeOp_value = map[string]int32{ "UNDEFINED": 0, "NEW": 1, "UPDATE": 2, "DELETE": 3, } )
Enum value maps for ChangeOp.
var ( AppMetadata_Status_name = map[int32]string{ 0: "INUSE", 1: "DEPRECATED", } AppMetadata_Status_value = map[string]int32{ "INUSE": 0, "DEPRECATED": 1, } )
Enum value maps for AppMetadata_Status.
var ( ElementOperation_Op_name = map[int32]string{ 0: "INVALID", 1: "SET", 2: "UNSET", 3: "PUBLISH", } ElementOperation_Op_value = map[string]int32{ "INVALID": 0, "SET": 1, "UNSET": 2, "PUBLISH": 3, } )
Enum value maps for ElementOperation_Op.
var File_acl_proto protoreflect.FileDescriptor
var File_types_proto protoreflect.FileDescriptor
Functions ¶
func ExtractPureKey ¶ added in v1.0.1
extractPureKey extract key=ele from sourceKey=root/element/app/env/ele
func FromStatus ¶ added in v1.0.2
func GenAclPolicyKey ¶ added in v1.0.1
func GenAclPolicyKey() string
func GenAppDirKey ¶ added in v1.0.1
func GenAppDirKey() string
func GenAppElementEnvKey ¶ added in v1.0.1
func GenAppElementKey ¶ added in v1.0.1
func GenAppEnvOperationKey ¶ added in v1.0.1
func GenAppOperationKey ¶ added in v1.0.1
func GenElementKey ¶ added in v1.0.1
genElementKey generate element's key in storage, if any parameter is empty will touch off a panic.
func GenElementOperationDirKey ¶ added in v1.0.1
func GenElementOperationKey ¶ added in v1.0.1
func GenElementOperationKeyPrefix ¶ added in v1.0.1
func GenInstanceNormalDirKey ¶ added in v1.0.1
func GenInstanceNormalDirKey() string
func GenInstanceNormalKey ¶ added in v1.0.1
func GenInstanceReversedKey ¶ added in v1.0.1
func GenInstanceReversedKeyWithInsId ¶ added in v1.0.1
func GenUserDirKey ¶ added in v1.0.1
func GenUserDirKey() string
func GenUserKey ¶ added in v1.0.1
func MarshalProto ¶
MarshalProto marshals a protobuf message to bytes.
func OperatorFromContext ¶ added in v1.0.1
func UnmarshalProto ¶
UnmarshalProto unmarshals bytes to a protobuf message.
func WithAgentPrefix ¶ added in v1.0.1
func WithMetadataSuffix ¶ added in v1.0.1
func WithOperator ¶ added in v1.0.1
func WithVersion ¶ added in v1.0.1
Types ¶
type AdmAggregate ¶
type AdmAggregate interface {
KVReadOnly
KVWriteOnly
InstanceHybrid
AgentHybrid
RBAC
}
AdmAggregate describes all methods should storage component should support.
type AgentAggregate ¶
type AgentAggregate interface {
KVReadOnly
InstanceHybrid
AgentHybrid
}
type AgentHybrid ¶
type AgentHybrid interface {
// Watch would block util any error happened, otherwise any change of agents will be
// pushed into ch.
Watch(ctx context.Context, ch chan<- *AgentInstanceChange) error
// Register helps agent registers itself.
Register(ctx context.Context, ins *AgentInstance, ttl int32) error
// Renew helps agents keep online.
Renew(ctx context.Context, ins *AgentInstance, ttl int32) error
// Unregister helps agent unregister itself.
Unregister(ctx context.Context, agentId string) error
GetAgents(ctx context.Context, seek string, limit int) (*GetAgentsResult, error)
}
AgentHybrid describes all methods to manage agent nodes in cassemdb.
type AgentInstance ¶
type AgentInstance struct {
// agentId is the unique identifier for agent.
AgentId string `protobuf:"bytes,1,opt,name=agentId,proto3" json:"agentId,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"`
// annotations contains the some custom label and value of AgentInstance.
Annotations map[string]string `` /* 163-byte string literal not displayed */
// contains filtered or unexported fields
}
AgentInstance describes agent node instance attributes.
func (*AgentInstance) Descriptor
deprecated
func (*AgentInstance) Descriptor() ([]byte, []int)
Deprecated: Use AgentInstance.ProtoReflect.Descriptor instead.
func (*AgentInstance) GetAddr ¶
func (x *AgentInstance) GetAddr() string
func (*AgentInstance) GetAgentId ¶
func (x *AgentInstance) GetAgentId() string
func (*AgentInstance) GetAnnotations ¶
func (x *AgentInstance) GetAnnotations() map[string]string
func (*AgentInstance) ProtoMessage ¶
func (*AgentInstance) ProtoMessage()
func (*AgentInstance) ProtoReflect ¶ added in v1.0.1
func (x *AgentInstance) ProtoReflect() protoreflect.Message
func (*AgentInstance) Reset ¶
func (x *AgentInstance) Reset()
func (*AgentInstance) String ¶
func (x *AgentInstance) String() string
func (*AgentInstance) Validate ¶
func (m *AgentInstance) Validate() error
Validate checks the field values on AgentInstance 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 (*AgentInstance) ValidateAll ¶ added in v1.0.1
func (m *AgentInstance) ValidateAll() error
ValidateAll checks the field values on AgentInstance 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 AgentInstanceMultiError, or nil if none found.
type AgentInstanceChange ¶
type AgentInstanceChange struct {
Ins *AgentInstance `protobuf:"bytes,1,opt,name=ins,proto3" json:"ins,omitempty"`
Op ChangeOp `protobuf:"varint,2,opt,name=op,proto3,enum=cassem.concept.ChangeOp" json:"op,omitempty"`
// contains filtered or unexported fields
}
func (*AgentInstanceChange) Descriptor
deprecated
func (*AgentInstanceChange) Descriptor() ([]byte, []int)
Deprecated: Use AgentInstanceChange.ProtoReflect.Descriptor instead.
func (*AgentInstanceChange) GetIns ¶
func (x *AgentInstanceChange) GetIns() *AgentInstance
func (*AgentInstanceChange) GetOp ¶
func (x *AgentInstanceChange) GetOp() ChangeOp
func (*AgentInstanceChange) ProtoMessage ¶
func (*AgentInstanceChange) ProtoMessage()
func (*AgentInstanceChange) ProtoReflect ¶ added in v1.0.1
func (x *AgentInstanceChange) ProtoReflect() protoreflect.Message
func (*AgentInstanceChange) Reset ¶
func (x *AgentInstanceChange) Reset()
func (*AgentInstanceChange) String ¶
func (x *AgentInstanceChange) String() string
func (*AgentInstanceChange) Validate ¶
func (m *AgentInstanceChange) Validate() error
Validate checks the field values on AgentInstanceChange 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 (*AgentInstanceChange) ValidateAll ¶ added in v1.0.1
func (m *AgentInstanceChange) ValidateAll() error
ValidateAll checks the field values on AgentInstanceChange 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 AgentInstanceChangeMultiError, or nil if none found.
type AgentInstanceChangeMultiError ¶ added in v1.0.1
type AgentInstanceChangeMultiError []error
AgentInstanceChangeMultiError is an error wrapping multiple validation errors returned by AgentInstanceChange.ValidateAll() if the designated constraints aren't met.
func (AgentInstanceChangeMultiError) AllErrors ¶ added in v1.0.1
func (m AgentInstanceChangeMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AgentInstanceChangeMultiError) Error ¶ added in v1.0.1
func (m AgentInstanceChangeMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AgentInstanceChangeValidationError ¶
type AgentInstanceChangeValidationError struct {
// contains filtered or unexported fields
}
AgentInstanceChangeValidationError is the validation error returned by AgentInstanceChange.Validate if the designated constraints aren't met.
func (AgentInstanceChangeValidationError) Cause ¶
func (e AgentInstanceChangeValidationError) Cause() error
Cause function returns cause value.
func (AgentInstanceChangeValidationError) Error ¶
func (e AgentInstanceChangeValidationError) Error() string
Error satisfies the builtin error interface
func (AgentInstanceChangeValidationError) ErrorName ¶
func (e AgentInstanceChangeValidationError) ErrorName() string
ErrorName returns error name.
func (AgentInstanceChangeValidationError) Field ¶
func (e AgentInstanceChangeValidationError) Field() string
Field function returns field value.
func (AgentInstanceChangeValidationError) Key ¶
func (e AgentInstanceChangeValidationError) Key() bool
Key function returns key value.
func (AgentInstanceChangeValidationError) Reason ¶
func (e AgentInstanceChangeValidationError) Reason() string
Reason function returns reason value.
type AgentInstanceMultiError ¶ added in v1.0.1
type AgentInstanceMultiError []error
AgentInstanceMultiError is an error wrapping multiple validation errors returned by AgentInstance.ValidateAll() if the designated constraints aren't met.
func (AgentInstanceMultiError) AllErrors ¶ added in v1.0.1
func (m AgentInstanceMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AgentInstanceMultiError) Error ¶ added in v1.0.1
func (m AgentInstanceMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AgentInstanceValidationError ¶
type AgentInstanceValidationError struct {
// contains filtered or unexported fields
}
AgentInstanceValidationError is the validation error returned by AgentInstance.Validate if the designated constraints aren't met.
func (AgentInstanceValidationError) Cause ¶
func (e AgentInstanceValidationError) Cause() error
Cause function returns cause value.
func (AgentInstanceValidationError) Error ¶
func (e AgentInstanceValidationError) Error() string
Error satisfies the builtin error interface
func (AgentInstanceValidationError) ErrorName ¶
func (e AgentInstanceValidationError) ErrorName() string
ErrorName returns error name.
func (AgentInstanceValidationError) Field ¶
func (e AgentInstanceValidationError) Field() string
Field function returns field value.
func (AgentInstanceValidationError) Key ¶
func (e AgentInstanceValidationError) Key() bool
Key function returns key value.
func (AgentInstanceValidationError) Reason ¶
func (e AgentInstanceValidationError) Reason() string
Reason function returns reason value.
type AppMetadata ¶
type AppMetadata struct {
Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"`
Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"`
CreatedAt int64 `protobuf:"varint,3,opt,name=createdAt,proto3" json:"createdAt,omitempty"`
// creator of the app indicates the user who created the app.
Creator string `protobuf:"bytes,4,opt,name=creator,proto3" json:"creator,omitempty"`
// owner of the app indicates the user who actually own this app.
// of course, admin account owns all apps.
Owner string `protobuf:"bytes,5,opt,name=owner,proto3" json:"owner,omitempty"`
Status AppMetadata_Status `protobuf:"varint,6,opt,name=status,proto3,enum=cassem.concept.AppMetadata_Status" json:"status,omitempty"`
// secrets is the key to acccecss the app's elements by different envs. If it's empty,
// that means the app is public.
Secrets map[string]string `` /* 155-byte string literal not displayed */
// contains filtered or unexported fields
}
AppMetadata contains metadata of one app, includes specific identity, description, and other fields to display the app's status.
func (*AppMetadata) Descriptor
deprecated
func (*AppMetadata) Descriptor() ([]byte, []int)
Deprecated: Use AppMetadata.ProtoReflect.Descriptor instead.
func (*AppMetadata) GetCreatedAt ¶
func (x *AppMetadata) GetCreatedAt() int64
func (*AppMetadata) GetCreator ¶
func (x *AppMetadata) GetCreator() string
func (*AppMetadata) GetDescription ¶
func (x *AppMetadata) GetDescription() string
func (*AppMetadata) GetId ¶
func (x *AppMetadata) GetId() string
func (*AppMetadata) GetOwner ¶
func (x *AppMetadata) GetOwner() string
func (*AppMetadata) GetSecrets ¶
func (x *AppMetadata) GetSecrets() map[string]string
func (*AppMetadata) GetStatus ¶
func (x *AppMetadata) GetStatus() AppMetadata_Status
func (*AppMetadata) ProtoMessage ¶
func (*AppMetadata) ProtoMessage()
func (*AppMetadata) ProtoReflect ¶ added in v1.0.1
func (x *AppMetadata) ProtoReflect() protoreflect.Message
func (*AppMetadata) Reset ¶
func (x *AppMetadata) Reset()
func (*AppMetadata) String ¶
func (x *AppMetadata) String() string
func (*AppMetadata) Validate ¶
func (m *AppMetadata) Validate() error
Validate checks the field values on AppMetadata 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 (*AppMetadata) ValidateAll ¶ added in v1.0.1
func (m *AppMetadata) ValidateAll() error
ValidateAll checks the field values on AppMetadata 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 AppMetadataMultiError, or nil if none found.
type AppMetadataMultiError ¶ added in v1.0.1
type AppMetadataMultiError []error
AppMetadataMultiError is an error wrapping multiple validation errors returned by AppMetadata.ValidateAll() if the designated constraints aren't met.
func (AppMetadataMultiError) AllErrors ¶ added in v1.0.1
func (m AppMetadataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (AppMetadataMultiError) Error ¶ added in v1.0.1
func (m AppMetadataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type AppMetadataValidationError ¶
type AppMetadataValidationError struct {
// contains filtered or unexported fields
}
AppMetadataValidationError is the validation error returned by AppMetadata.Validate if the designated constraints aren't met.
func (AppMetadataValidationError) Cause ¶
func (e AppMetadataValidationError) Cause() error
Cause function returns cause value.
func (AppMetadataValidationError) Error ¶
func (e AppMetadataValidationError) Error() string
Error satisfies the builtin error interface
func (AppMetadataValidationError) ErrorName ¶
func (e AppMetadataValidationError) ErrorName() string
ErrorName returns error name.
func (AppMetadataValidationError) Field ¶
func (e AppMetadataValidationError) Field() string
Field function returns field value.
func (AppMetadataValidationError) Key ¶
func (e AppMetadataValidationError) Key() bool
Key function returns key value.
func (AppMetadataValidationError) Reason ¶
func (e AppMetadataValidationError) Reason() string
Reason function returns reason value.
type AppMetadata_Status ¶
type AppMetadata_Status int32
const ( AppMetadata_INUSE AppMetadata_Status = 0 // DEPRECATED represents the app is deprecated. It can only read but update. AppMetadata_DEPRECATED AppMetadata_Status = 1 )
func (AppMetadata_Status) Descriptor ¶ added in v1.0.1
func (AppMetadata_Status) Descriptor() protoreflect.EnumDescriptor
func (AppMetadata_Status) Enum ¶ added in v1.0.1
func (x AppMetadata_Status) Enum() *AppMetadata_Status
func (AppMetadata_Status) EnumDescriptor
deprecated
func (AppMetadata_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use AppMetadata_Status.Descriptor instead.
func (AppMetadata_Status) Number ¶ added in v1.0.1
func (x AppMetadata_Status) Number() protoreflect.EnumNumber
func (AppMetadata_Status) String ¶
func (x AppMetadata_Status) String() string
func (AppMetadata_Status) Type ¶ added in v1.0.1
func (AppMetadata_Status) Type() protoreflect.EnumType
type Casbin ¶
type Casbin struct {
Policies []*Casbin_Policy `protobuf:"bytes,1,rep,name=policies,proto3" json:"policies,omitempty"`
// contains filtered or unexported fields
}
Casbin represent the casbin model.
func (*Casbin) Descriptor
deprecated
func (*Casbin) GetPolicies ¶
func (x *Casbin) GetPolicies() []*Casbin_Policy
func (*Casbin) ProtoMessage ¶
func (*Casbin) ProtoMessage()
func (*Casbin) ProtoReflect ¶ added in v1.0.1
func (x *Casbin) ProtoReflect() protoreflect.Message
func (*Casbin) Validate ¶
Validate checks the field values on Casbin 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 (*Casbin) ValidateAll ¶ added in v1.0.1
ValidateAll checks the field values on Casbin 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 CasbinMultiError, or nil if none found.
type CasbinMultiError ¶ added in v1.0.1
type CasbinMultiError []error
CasbinMultiError is an error wrapping multiple validation errors returned by Casbin.ValidateAll() if the designated constraints aren't met.
func (CasbinMultiError) AllErrors ¶ added in v1.0.1
func (m CasbinMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (CasbinMultiError) Error ¶ added in v1.0.1
func (m CasbinMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type CasbinValidationError ¶
type CasbinValidationError struct {
// contains filtered or unexported fields
}
CasbinValidationError is the validation error returned by Casbin.Validate if the designated constraints aren't met.
func (CasbinValidationError) Cause ¶
func (e CasbinValidationError) Cause() error
Cause function returns cause value.
func (CasbinValidationError) Error ¶
func (e CasbinValidationError) Error() string
Error satisfies the builtin error interface
func (CasbinValidationError) ErrorName ¶
func (e CasbinValidationError) ErrorName() string
ErrorName returns error name.
func (CasbinValidationError) Field ¶
func (e CasbinValidationError) Field() string
Field function returns field value.
func (CasbinValidationError) Key ¶
func (e CasbinValidationError) Key() bool
Key function returns key value.
func (CasbinValidationError) Reason ¶
func (e CasbinValidationError) Reason() string
Reason function returns reason value.
type Casbin_Policy ¶
type Casbin_Policy struct {
Ptype string `protobuf:"bytes,1,opt,name=Ptype,proto3" json:"Ptype,omitempty"`
V0 string `protobuf:"bytes,2,opt,name=V0,proto3" json:"V0,omitempty"`
V1 string `protobuf:"bytes,3,opt,name=V1,proto3" json:"V1,omitempty"`
V2 string `protobuf:"bytes,4,opt,name=V2,proto3" json:"V2,omitempty"`
V3 string `protobuf:"bytes,5,opt,name=V3,proto3" json:"V3,omitempty"`
V4 string `protobuf:"bytes,6,opt,name=V4,proto3" json:"V4,omitempty"`
V5 string `protobuf:"bytes,7,opt,name=V5,proto3" json:"V5,omitempty"`
// contains filtered or unexported fields
}
func (*Casbin_Policy) Descriptor
deprecated
func (*Casbin_Policy) Descriptor() ([]byte, []int)
Deprecated: Use Casbin_Policy.ProtoReflect.Descriptor instead.
func (*Casbin_Policy) GetPtype ¶
func (x *Casbin_Policy) GetPtype() string
func (*Casbin_Policy) GetV0 ¶
func (x *Casbin_Policy) GetV0() string
func (*Casbin_Policy) GetV1 ¶
func (x *Casbin_Policy) GetV1() string
func (*Casbin_Policy) GetV2 ¶
func (x *Casbin_Policy) GetV2() string
func (*Casbin_Policy) GetV3 ¶
func (x *Casbin_Policy) GetV3() string
func (*Casbin_Policy) GetV4 ¶
func (x *Casbin_Policy) GetV4() string
func (*Casbin_Policy) GetV5 ¶
func (x *Casbin_Policy) GetV5() string
func (*Casbin_Policy) ProtoMessage ¶
func (*Casbin_Policy) ProtoMessage()
func (*Casbin_Policy) ProtoReflect ¶ added in v1.0.1
func (x *Casbin_Policy) ProtoReflect() protoreflect.Message
func (*Casbin_Policy) Reset ¶
func (x *Casbin_Policy) Reset()
func (*Casbin_Policy) String ¶
func (x *Casbin_Policy) String() string
func (*Casbin_Policy) Validate ¶
func (m *Casbin_Policy) Validate() error
Validate checks the field values on Casbin_Policy 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 (*Casbin_Policy) ValidateAll ¶ added in v1.0.1
func (m *Casbin_Policy) ValidateAll() error
ValidateAll checks the field values on Casbin_Policy 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 Casbin_PolicyMultiError, or nil if none found.
type Casbin_PolicyMultiError ¶ added in v1.0.1
type Casbin_PolicyMultiError []error
Casbin_PolicyMultiError is an error wrapping multiple validation errors returned by Casbin_Policy.ValidateAll() if the designated constraints aren't met.
func (Casbin_PolicyMultiError) AllErrors ¶ added in v1.0.1
func (m Casbin_PolicyMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (Casbin_PolicyMultiError) Error ¶ added in v1.0.1
func (m Casbin_PolicyMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type Casbin_PolicyValidationError ¶
type Casbin_PolicyValidationError struct {
// contains filtered or unexported fields
}
Casbin_PolicyValidationError is the validation error returned by Casbin_Policy.Validate if the designated constraints aren't met.
func (Casbin_PolicyValidationError) Cause ¶
func (e Casbin_PolicyValidationError) Cause() error
Cause function returns cause value.
func (Casbin_PolicyValidationError) Error ¶
func (e Casbin_PolicyValidationError) Error() string
Error satisfies the builtin error interface
func (Casbin_PolicyValidationError) ErrorName ¶
func (e Casbin_PolicyValidationError) ErrorName() string
ErrorName returns error name.
func (Casbin_PolicyValidationError) Field ¶
func (e Casbin_PolicyValidationError) Field() string
Field function returns field value.
func (Casbin_PolicyValidationError) Key ¶
func (e Casbin_PolicyValidationError) Key() bool
Key function returns key value.
func (Casbin_PolicyValidationError) Reason ¶
func (e Casbin_PolicyValidationError) Reason() string
Reason function returns reason value.
type Change ¶ added in v1.0.2
type Change interface {
Topic() string
Type() ChangeType
}
Change describes the minimal event contract shared by API messages and watchers.
type ChangeOp ¶
type ChangeOp int32
func (ChangeOp) Descriptor ¶ added in v1.0.1
func (ChangeOp) Descriptor() protoreflect.EnumDescriptor
func (ChangeOp) EnumDescriptor
deprecated
func (ChangeOp) Number ¶ added in v1.0.1
func (x ChangeOp) Number() protoreflect.EnumNumber
func (ChangeOp) Type ¶ added in v1.0.1
func (ChangeOp) Type() protoreflect.EnumType
type ChangeType ¶ added in v1.0.2
type ChangeType int32
const ( ChangeType_CHANGE_TYPE_UNKNOWN ChangeType = 0 ChangeType_KV ChangeType = 1 ChangeType_DIR ChangeType = 2 )
func (ChangeType) Descriptor ¶ added in v1.0.2
func (ChangeType) Descriptor() protoreflect.EnumDescriptor
func (ChangeType) Enum ¶ added in v1.0.2
func (x ChangeType) Enum() *ChangeType
func (ChangeType) EnumDescriptor
deprecated
added in
v1.0.2
func (ChangeType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ChangeType.Descriptor instead.
func (ChangeType) Number ¶ added in v1.0.2
func (x ChangeType) Number() protoreflect.EnumNumber
func (ChangeType) String ¶ added in v1.0.2
func (x ChangeType) String() string
func (ChangeType) Type ¶ added in v1.0.2
func (ChangeType) Type() protoreflect.EnumType
type Code ¶ added in v1.0.2
type Code uint32
type CommonPager ¶ added in v1.0.1
type ContentType ¶
type ContentType int32
ContentType enumerates all built-in content types those Element's raw could be.
const ( ContentType_UNKNOWN ContentType = 0 // application/json ContentType_JSON ContentType = 1 // application/toml ContentType_TOML ContentType = 2 // application/ini ContentType_INI ContentType = 3 // application/plaintext ContentType_PLAINTEXT ContentType = 4 )
func (ContentType) Descriptor ¶ added in v1.0.1
func (ContentType) Descriptor() protoreflect.EnumDescriptor
func (ContentType) Enum ¶ added in v1.0.1
func (x ContentType) Enum() *ContentType
func (ContentType) EnumDescriptor
deprecated
func (ContentType) EnumDescriptor() ([]byte, []int)
Deprecated: Use ContentType.Descriptor instead.
func (ContentType) Number ¶ added in v1.0.1
func (x ContentType) Number() protoreflect.EnumNumber
func (ContentType) String ¶
func (x ContentType) String() string
func (ContentType) Type ¶ added in v1.0.1
func (ContentType) Type() protoreflect.EnumType
type Element ¶
type Element struct {
// refer ElementMetadata
Metadata *ElementMetadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
// raw data in the version.
Raw []byte `protobuf:"bytes,2,opt,name=raw,proto3" json:"raw,omitempty"`
// version number start since 1.
Version int32 `protobuf:"varint,3,opt,name=version,proto3" json:"version,omitempty"`
// indicates published or not.
Published bool `protobuf:"varint,4,opt,name=published,proto3" json:"published,omitempty"`
// contains filtered or unexported fields
}
Element represent a config element with specific version.
func (*Element) Descriptor
deprecated
func (*Element) GetMetadata ¶
func (x *Element) GetMetadata() *ElementMetadata
func (*Element) GetPublished ¶
func (*Element) GetVersion ¶
func (*Element) MarshalJSON ¶
MarshalJSON implements json.Marshaler for Element.
func (*Element) ProtoMessage ¶
func (*Element) ProtoMessage()
func (*Element) ProtoReflect ¶ added in v1.0.1
func (x *Element) ProtoReflect() protoreflect.Message
func (*Element) Validate ¶
Validate checks the field values on Element 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 (*Element) ValidateAll ¶ added in v1.0.1
ValidateAll checks the field values on Element 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 ElementMultiError, or nil if none found.
type ElementMetadata ¶
type ElementMetadata struct {
Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"`
App string `protobuf:"bytes,2,opt,name=app,proto3" json:"app,omitempty"`
Env string `protobuf:"bytes,3,opt,name=env,proto3" json:"env,omitempty"`
// the latest version in all versions of the element.
LatestVersion int32 `protobuf:"varint,4,opt,name=latestVersion,proto3" json:"latestVersion,omitempty"`
// if there is any unpublished version, if there's any unpublished
// version, the element can not create a new version util all versions have been
// published,
UnpublishedVersion int32 `protobuf:"varint,5,opt,name=unpublishedVersion,proto3" json:"unpublishedVersion,omitempty"`
// the in-use version.
UsingVersion int32 `protobuf:"varint,6,opt,name=usingVersion,proto3" json:"usingVersion,omitempty"`
// the using version's fingerprint.
UsingFingerprint string `protobuf:"bytes,7,opt,name=usingFingerprint,proto3" json:"usingFingerprint,omitempty"`
// indicates the content type of Element's raw data
ContentType ContentType `protobuf:"varint,8,opt,name=contentType,proto3,enum=cassem.concept.ContentType" json:"contentType,omitempty"`
// contains filtered or unexported fields
}
ElementMetadata contains metadata of one element, includes specific key, app, env attributes, and other fields to display the element's version status.
func (*ElementMetadata) Descriptor
deprecated
func (*ElementMetadata) Descriptor() ([]byte, []int)
Deprecated: Use ElementMetadata.ProtoReflect.Descriptor instead.
func (*ElementMetadata) GetApp ¶
func (x *ElementMetadata) GetApp() string
func (*ElementMetadata) GetContentType ¶
func (x *ElementMetadata) GetContentType() ContentType
func (*ElementMetadata) GetEnv ¶
func (x *ElementMetadata) GetEnv() string
func (*ElementMetadata) GetKey ¶
func (x *ElementMetadata) GetKey() string
func (*ElementMetadata) GetLatestVersion ¶
func (x *ElementMetadata) GetLatestVersion() int32
func (*ElementMetadata) GetUnpublishedVersion ¶
func (x *ElementMetadata) GetUnpublishedVersion() int32
func (*ElementMetadata) GetUsingFingerprint ¶
func (x *ElementMetadata) GetUsingFingerprint() string
func (*ElementMetadata) GetUsingVersion ¶
func (x *ElementMetadata) GetUsingVersion() int32
func (*ElementMetadata) MarshalJSON ¶
func (m *ElementMetadata) MarshalJSON() ([]byte, error)
MarshalJSON implements json.Marshaler for ElementMetadata.
func (*ElementMetadata) ProtoMessage ¶
func (*ElementMetadata) ProtoMessage()
func (*ElementMetadata) ProtoReflect ¶ added in v1.0.1
func (x *ElementMetadata) ProtoReflect() protoreflect.Message
func (*ElementMetadata) Reset ¶
func (x *ElementMetadata) Reset()
func (*ElementMetadata) String ¶
func (x *ElementMetadata) String() string
func (*ElementMetadata) Validate ¶
func (m *ElementMetadata) Validate() error
Validate checks the field values on ElementMetadata 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 (*ElementMetadata) ValidateAll ¶ added in v1.0.1
func (m *ElementMetadata) ValidateAll() error
ValidateAll checks the field values on ElementMetadata 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 ElementMetadataMultiError, or nil if none found.
type ElementMetadataMultiError ¶ added in v1.0.1
type ElementMetadataMultiError []error
ElementMetadataMultiError is an error wrapping multiple validation errors returned by ElementMetadata.ValidateAll() if the designated constraints aren't met.
func (ElementMetadataMultiError) AllErrors ¶ added in v1.0.1
func (m ElementMetadataMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ElementMetadataMultiError) Error ¶ added in v1.0.1
func (m ElementMetadataMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ElementMetadataValidationError ¶
type ElementMetadataValidationError struct {
// contains filtered or unexported fields
}
ElementMetadataValidationError is the validation error returned by ElementMetadata.Validate if the designated constraints aren't met.
func (ElementMetadataValidationError) Cause ¶
func (e ElementMetadataValidationError) Cause() error
Cause function returns cause value.
func (ElementMetadataValidationError) Error ¶
func (e ElementMetadataValidationError) Error() string
Error satisfies the builtin error interface
func (ElementMetadataValidationError) ErrorName ¶
func (e ElementMetadataValidationError) ErrorName() string
ErrorName returns error name.
func (ElementMetadataValidationError) Field ¶
func (e ElementMetadataValidationError) Field() string
Field function returns field value.
func (ElementMetadataValidationError) Key ¶
func (e ElementMetadataValidationError) Key() bool
Key function returns key value.
func (ElementMetadataValidationError) Reason ¶
func (e ElementMetadataValidationError) Reason() string
Reason function returns reason value.
type ElementMultiError ¶ added in v1.0.1
type ElementMultiError []error
ElementMultiError is an error wrapping multiple validation errors returned by Element.ValidateAll() if the designated constraints aren't met.
func (ElementMultiError) AllErrors ¶ added in v1.0.1
func (m ElementMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ElementMultiError) Error ¶ added in v1.0.1
func (m ElementMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ElementOperation ¶
type ElementOperation struct {
// operator indicates the user who execute the operation.
Operator string `protobuf:"bytes,1,opt,name=operator,proto3" json:"operator,omitempty"`
OperatedAt int64 `protobuf:"varint,2,opt,name=operatedAt,proto3" json:"operatedAt,omitempty"`
OperatedKey string `protobuf:"bytes,3,opt,name=operatedKey,proto3" json:"operatedKey,omitempty"`
Op ElementOperation_Op `protobuf:"varint,4,opt,name=op,proto3,enum=cassem.concept.ElementOperation_Op" json:"op,omitempty"`
LastVersion int32 `protobuf:"varint,5,opt,name=lastVersion,proto3" json:"lastVersion,omitempty"`
CurrentVersion int32 `protobuf:"varint,6,opt,name=currentVersion,proto3" json:"currentVersion,omitempty"`
Remark string `protobuf:"bytes,7,opt,name=remark,proto3" json:"remark,omitempty"`
// contains filtered or unexported fields
}
ElementOperation is used to indicate the operation of one element.
func (*ElementOperation) Descriptor
deprecated
func (*ElementOperation) Descriptor() ([]byte, []int)
Deprecated: Use ElementOperation.ProtoReflect.Descriptor instead.
func (*ElementOperation) GetCurrentVersion ¶
func (x *ElementOperation) GetCurrentVersion() int32
func (*ElementOperation) GetLastVersion ¶
func (x *ElementOperation) GetLastVersion() int32
func (*ElementOperation) GetOp ¶
func (x *ElementOperation) GetOp() ElementOperation_Op
func (*ElementOperation) GetOperatedAt ¶
func (x *ElementOperation) GetOperatedAt() int64
func (*ElementOperation) GetOperatedKey ¶
func (x *ElementOperation) GetOperatedKey() string
func (*ElementOperation) GetOperator ¶
func (x *ElementOperation) GetOperator() string
func (*ElementOperation) GetRemark ¶
func (x *ElementOperation) GetRemark() string
func (*ElementOperation) ProtoMessage ¶
func (*ElementOperation) ProtoMessage()
func (*ElementOperation) ProtoReflect ¶ added in v1.0.1
func (x *ElementOperation) ProtoReflect() protoreflect.Message
func (*ElementOperation) Reset ¶
func (x *ElementOperation) Reset()
func (*ElementOperation) String ¶
func (x *ElementOperation) String() string
func (*ElementOperation) Validate ¶
func (m *ElementOperation) Validate() error
Validate checks the field values on ElementOperation 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 (*ElementOperation) ValidateAll ¶ added in v1.0.1
func (m *ElementOperation) ValidateAll() error
ValidateAll checks the field values on ElementOperation 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 ElementOperationMultiError, or nil if none found.
type ElementOperationMultiError ¶ added in v1.0.1
type ElementOperationMultiError []error
ElementOperationMultiError is an error wrapping multiple validation errors returned by ElementOperation.ValidateAll() if the designated constraints aren't met.
func (ElementOperationMultiError) AllErrors ¶ added in v1.0.1
func (m ElementOperationMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (ElementOperationMultiError) Error ¶ added in v1.0.1
func (m ElementOperationMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type ElementOperationValidationError ¶
type ElementOperationValidationError struct {
// contains filtered or unexported fields
}
ElementOperationValidationError is the validation error returned by ElementOperation.Validate if the designated constraints aren't met.
func (ElementOperationValidationError) Cause ¶
func (e ElementOperationValidationError) Cause() error
Cause function returns cause value.
func (ElementOperationValidationError) Error ¶
func (e ElementOperationValidationError) Error() string
Error satisfies the builtin error interface
func (ElementOperationValidationError) ErrorName ¶
func (e ElementOperationValidationError) ErrorName() string
ErrorName returns error name.
func (ElementOperationValidationError) Field ¶
func (e ElementOperationValidationError) Field() string
Field function returns field value.
func (ElementOperationValidationError) Key ¶
func (e ElementOperationValidationError) Key() bool
Key function returns key value.
func (ElementOperationValidationError) Reason ¶
func (e ElementOperationValidationError) Reason() string
Reason function returns reason value.
type ElementOperation_Op ¶
type ElementOperation_Op int32
const ( ElementOperation_INVALID ElementOperation_Op = 0 ElementOperation_SET ElementOperation_Op = 1 ElementOperation_UNSET ElementOperation_Op = 2 ElementOperation_PUBLISH ElementOperation_Op = 3 )
func (ElementOperation_Op) Descriptor ¶ added in v1.0.1
func (ElementOperation_Op) Descriptor() protoreflect.EnumDescriptor
func (ElementOperation_Op) Enum ¶ added in v1.0.1
func (x ElementOperation_Op) Enum() *ElementOperation_Op
func (ElementOperation_Op) EnumDescriptor
deprecated
func (ElementOperation_Op) EnumDescriptor() ([]byte, []int)
Deprecated: Use ElementOperation_Op.Descriptor instead.
func (ElementOperation_Op) Number ¶ added in v1.0.1
func (x ElementOperation_Op) Number() protoreflect.EnumNumber
func (ElementOperation_Op) String ¶
func (x ElementOperation_Op) String() string
func (ElementOperation_Op) Type ¶ added in v1.0.1
func (ElementOperation_Op) Type() protoreflect.EnumType
type ElementValidationError ¶
type ElementValidationError struct {
// contains filtered or unexported fields
}
ElementValidationError is the validation error returned by Element.Validate if the designated constraints aren't met.
func (ElementValidationError) Cause ¶
func (e ElementValidationError) Cause() error
Cause function returns cause value.
func (ElementValidationError) Error ¶
func (e ElementValidationError) Error() string
Error satisfies the builtin error interface
func (ElementValidationError) ErrorName ¶
func (e ElementValidationError) ErrorName() string
ErrorName returns error name.
func (ElementValidationError) Field ¶
func (e ElementValidationError) Field() string
Field function returns field value.
func (ElementValidationError) Key ¶
func (e ElementValidationError) Key() bool
Key function returns key value.
func (ElementValidationError) Reason ¶
func (e ElementValidationError) Reason() string
Reason function returns reason value.
type GetAgentsResult ¶ added in v1.0.1
type GetAgentsResult struct {
CommonPager
Agents []*AgentInstance `json:"agents"`
}
type GetAppEnvsResult ¶ added in v1.0.1
type GetAppEnvsResult struct {
CommonPager
Environments []string `json:"envs"`
}
type GetAppsResult ¶ added in v1.0.1
type GetAppsResult struct {
CommonPager
Apps []*AppMetadata `json:"apps"`
}
type GetElementOperationsResult ¶ added in v1.0.1
type GetElementOperationsResult struct {
CommonPager
Operations []*ElementOperation `json:"operations"`
}
type GetElementsResult ¶ added in v1.0.1
type GetElementsResult struct {
CommonPager
Elements []*Element `json:"elements"`
}
type GetInstancesResult ¶ added in v1.0.1
type GetInstancesResult struct {
CommonPager
Instances []*Instance `json:"instances"`
}
type GetUsersResult ¶ added in v1.0.1
type GetUsersResult struct {
CommonPager
Users []*User `json:"users"`
}
type Instance ¶
type Instance struct {
ClientId string `protobuf:"bytes,1,opt,name=clientId,proto3" json:"clientId,omitempty"`
AgentId string `protobuf:"bytes,2,opt,name=agentId,proto3" json:"agentId,omitempty"`
ClientIp string `protobuf:"bytes,3,opt,name=clientIp,proto3" json:"clientIp,omitempty"`
Watching []*Instance_Watching `protobuf:"bytes,4,rep,name=watching,proto3" json:"watching,omitempty"`
LastRenewTimestamp int64 `protobuf:"varint,5,opt,name=lastRenewTimestamp,proto3" json:"lastRenewTimestamp,omitempty"`
// contains filtered or unexported fields
}
Instance describes client instance.
func (*Instance) Descriptor
deprecated
func (*Instance) GetAgentId ¶
func (*Instance) GetClientId ¶
func (*Instance) GetClientIp ¶
func (*Instance) GetLastRenewTimestamp ¶
func (*Instance) GetWatching ¶
func (x *Instance) GetWatching() []*Instance_Watching
func (*Instance) ProtoMessage ¶
func (*Instance) ProtoMessage()
func (*Instance) ProtoReflect ¶ added in v1.0.1
func (x *Instance) ProtoReflect() protoreflect.Message
func (*Instance) Validate ¶
Validate checks the field values on Instance 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 (*Instance) ValidateAll ¶ added in v1.0.1
ValidateAll checks the field values on Instance 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 InstanceMultiError, or nil if none found.
type InstanceHybrid ¶
type InstanceHybrid interface {
// GetInstances get all instance those have registered into cluster.
GetInstances(ctx context.Context, seek string, limit int) (*GetInstancesResult, error)
// GetInstancesByElement get all instance those watching this app/env/key.
GetInstancesByElement(ctx context.Context, app, env, key string) (*GetInstancesResult, error)
// GetInstance describes instance detail by insId.
GetInstance(ctx context.Context, insId string) (*Instance, error)
RegisterInstance(ctx context.Context, ins *Instance) error
RenewInstance(ctx context.Context, ins *Instance) error
UnregisterInstance(ctx context.Context, insId string) error
}
InstanceHybrid describes all methods to manages instance information.
type InstanceMultiError ¶ added in v1.0.1
type InstanceMultiError []error
InstanceMultiError is an error wrapping multiple validation errors returned by Instance.ValidateAll() if the designated constraints aren't met.
func (InstanceMultiError) AllErrors ¶ added in v1.0.1
func (m InstanceMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (InstanceMultiError) Error ¶ added in v1.0.1
func (m InstanceMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type InstanceValidationError ¶
type InstanceValidationError struct {
// contains filtered or unexported fields
}
InstanceValidationError is the validation error returned by Instance.Validate if the designated constraints aren't met.
func (InstanceValidationError) Cause ¶
func (e InstanceValidationError) Cause() error
Cause function returns cause value.
func (InstanceValidationError) Error ¶
func (e InstanceValidationError) Error() string
Error satisfies the builtin error interface
func (InstanceValidationError) ErrorName ¶
func (e InstanceValidationError) ErrorName() string
ErrorName returns error name.
func (InstanceValidationError) Field ¶
func (e InstanceValidationError) Field() string
Field function returns field value.
func (InstanceValidationError) Key ¶
func (e InstanceValidationError) Key() bool
Key function returns key value.
func (InstanceValidationError) Reason ¶
func (e InstanceValidationError) Reason() string
Reason function returns reason value.
type Instance_Watching ¶
type Instance_Watching struct {
App string `protobuf:"bytes,1,opt,name=app,proto3" json:"app,omitempty"`
Env string `protobuf:"bytes,2,opt,name=env,proto3" json:"env,omitempty"`
WatchKeys []string `protobuf:"bytes,3,rep,name=watchKeys,proto3" json:"watchKeys,omitempty"`
// contains filtered or unexported fields
}
func (*Instance_Watching) Descriptor
deprecated
func (*Instance_Watching) Descriptor() ([]byte, []int)
Deprecated: Use Instance_Watching.ProtoReflect.Descriptor instead.
func (*Instance_Watching) GetApp ¶
func (x *Instance_Watching) GetApp() string
func (*Instance_Watching) GetEnv ¶
func (x *Instance_Watching) GetEnv() string
func (*Instance_Watching) GetWatchKeys ¶
func (x *Instance_Watching) GetWatchKeys() []string
func (*Instance_Watching) ProtoMessage ¶
func (*Instance_Watching) ProtoMessage()
func (*Instance_Watching) ProtoReflect ¶ added in v1.0.1
func (x *Instance_Watching) ProtoReflect() protoreflect.Message
func (*Instance_Watching) Reset ¶
func (x *Instance_Watching) Reset()
func (*Instance_Watching) String ¶
func (x *Instance_Watching) String() string
func (*Instance_Watching) Validate ¶
func (m *Instance_Watching) Validate() error
Validate checks the field values on Instance_Watching 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 (*Instance_Watching) ValidateAll ¶ added in v1.0.1
func (m *Instance_Watching) ValidateAll() error
ValidateAll checks the field values on Instance_Watching 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 Instance_WatchingMultiError, or nil if none found.
type Instance_WatchingMultiError ¶ added in v1.0.1
type Instance_WatchingMultiError []error
Instance_WatchingMultiError is an error wrapping multiple validation errors returned by Instance_Watching.ValidateAll() if the designated constraints aren't met.
func (Instance_WatchingMultiError) AllErrors ¶ added in v1.0.1
func (m Instance_WatchingMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (Instance_WatchingMultiError) Error ¶ added in v1.0.1
func (m Instance_WatchingMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type Instance_WatchingValidationError ¶
type Instance_WatchingValidationError struct {
// contains filtered or unexported fields
}
Instance_WatchingValidationError is the validation error returned by Instance_Watching.Validate if the designated constraints aren't met.
func (Instance_WatchingValidationError) Cause ¶
func (e Instance_WatchingValidationError) Cause() error
Cause function returns cause value.
func (Instance_WatchingValidationError) Error ¶
func (e Instance_WatchingValidationError) Error() string
Error satisfies the builtin error interface
func (Instance_WatchingValidationError) ErrorName ¶
func (e Instance_WatchingValidationError) ErrorName() string
ErrorName returns error name.
func (Instance_WatchingValidationError) Field ¶
func (e Instance_WatchingValidationError) Field() string
Field function returns field value.
func (Instance_WatchingValidationError) Key ¶
func (e Instance_WatchingValidationError) Key() bool
Key function returns key value.
func (Instance_WatchingValidationError) Reason ¶
func (e Instance_WatchingValidationError) Reason() string
Reason function returns reason value.
type KVReadOnly ¶
type KVReadOnly interface {
GetElementWithVersion(ctx context.Context, app, env, key string, version int) (*Element, error)
GetElementVersions(ctx context.Context, app, env, key string,
seek string, limit int) (*GetElementsResult, error)
GetElements(ctx context.Context, app, env string, seek string, limit int, query string) (*GetElementsResult, error)
GetElementsByKeys(ctx context.Context, app, env string, keys []string) (*GetElementsResult, error)
GetElementOperations(ctx context.Context, app, env, key string,
seek string, limit int) (*GetElementOperationsResult, error)
GetApp(ctx context.Context, app string) (*AppMetadata, error)
GetApps(ctx context.Context, seek string, limit int, query string) (*GetAppsResult, error)
GetEnvironments(ctx context.Context, app, seek string, limit int) (*GetAppEnvsResult, error)
}
type KVWriteOnly ¶
type KVWriteOnly interface {
CreateElement(ctx context.Context, app, env, key string, raw []byte, contentTyp ContentType) error
UpdateElement(ctx context.Context, app, env, key string, raw []byte) error
DeleteElement(ctx context.Context, app, env, key string) error
CreateEnvironment(ctx context.Context, app, env string) error
DeleteEnvironment(ctx context.Context, app, env string) error
RollbackElementVersion(ctx context.Context, app string, env string, key string,
rollbackVersion uint32) error
PublishElementVersion(ctx context.Context, app string, env string, key string,
publishVersion uint32) (*Element, error)
CreateApp(ctx context.Context, md *AppMetadata) error
DeleteApp(ctx context.Context, appId string) error
}
type PublishingMode ¶
type PublishingMode uint8
PublishingMode indicates how to publish the element's update.
const ( // PublishMode_GRAY gray publish mode only push to specified instance. PublishMode_GRAY PublishingMode = iota + 1 // PublishMode_FULL full publish mode, push to all instances. PublishMode_FULL )
type RBAC ¶
type RBAC interface {
GetUser(account string) (*User, error)
GetUsers(seek string, limit int) (*GetUsersResult, error)
GetUserRoles(account string) ([]string, error)
GetUserRoleBindings(account string) ([]RoleBinding, error)
ListDomainOptions() ([]string, error)
AddUser(u *User) error
DisableUser(account string) error
ResetUser(account, password string) error
AssignRole(account, role string, domain ...string) error
RevokeRole(account, role string, domain ...string) error
Enforce(subject, domain, object, act string) (bool, error)
AutoMigrate() error
BootstrapAdmin(account, nickname, password string) error
}
RBAC is an ACL model to implement authentication permission management.
type RoleBinding ¶ added in v1.0.1
type User ¶
type User struct {
// account
Account string `protobuf:"bytes,1,opt,name=account,proto3" json:"account,omitempty"`
Nickname string `protobuf:"bytes,2,opt,name=nickname,proto3" json:"nickname,omitempty"`
HashedPassword string `protobuf:"bytes,3,opt,name=hashedPassword,proto3" json:"hashedPassword,omitempty"`
Salt string `protobuf:"bytes,4,opt,name=salt,proto3" json:"salt,omitempty"`
Status User_Status `protobuf:"varint,5,opt,name=status,proto3,enum=cassem.concept.User_Status" json:"status,omitempty"`
// contains filtered or unexported fields
}
func (*User) Descriptor
deprecated
func (*User) GetAccount ¶
func (*User) GetHashedPassword ¶
func (*User) GetNickname ¶
func (*User) GetStatus ¶
func (x *User) GetStatus() User_Status
func (*User) ProtoMessage ¶
func (*User) ProtoMessage()
func (*User) ProtoReflect ¶ added in v1.0.1
func (x *User) ProtoReflect() protoreflect.Message
func (*User) Validate ¶
Validate checks the field values on User 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 (*User) ValidateAll ¶ added in v1.0.1
ValidateAll checks the field values on User 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 UserMultiError, or nil if none found.
type UserMultiError ¶ added in v1.0.1
type UserMultiError []error
UserMultiError is an error wrapping multiple validation errors returned by User.ValidateAll() if the designated constraints aren't met.
func (UserMultiError) AllErrors ¶ added in v1.0.1
func (m UserMultiError) AllErrors() []error
AllErrors returns a list of validation violation errors.
func (UserMultiError) Error ¶ added in v1.0.1
func (m UserMultiError) Error() string
Error returns a concatenation of all the error messages it wraps.
type UserValidationError ¶
type UserValidationError struct {
// contains filtered or unexported fields
}
UserValidationError is the validation error returned by User.Validate if the designated constraints aren't met.
func (UserValidationError) Cause ¶
func (e UserValidationError) Cause() error
Cause function returns cause value.
func (UserValidationError) Error ¶
func (e UserValidationError) Error() string
Error satisfies the builtin error interface
func (UserValidationError) ErrorName ¶
func (e UserValidationError) ErrorName() string
ErrorName returns error name.
func (UserValidationError) Field ¶
func (e UserValidationError) Field() string
Field function returns field value.
func (UserValidationError) Key ¶
func (e UserValidationError) Key() bool
Key function returns key value.
func (UserValidationError) Reason ¶
func (e UserValidationError) Reason() string
Reason function returns reason value.
type User_Status ¶
type User_Status int32
const ( User_NORMAL User_Status = 0 // FORBIDDEN indicates the user is forbidden to access the system. User_FORBIDDEN User_Status = 1 )
func (User_Status) Descriptor ¶ added in v1.0.1
func (User_Status) Descriptor() protoreflect.EnumDescriptor
func (User_Status) Enum ¶ added in v1.0.1
func (x User_Status) Enum() *User_Status
func (User_Status) EnumDescriptor
deprecated
func (User_Status) EnumDescriptor() ([]byte, []int)
Deprecated: Use User_Status.Descriptor instead.
func (User_Status) Number ¶ added in v1.0.1
func (x User_Status) Number() protoreflect.EnumNumber
func (User_Status) String ¶
func (x User_Status) String() string
func (User_Status) Type ¶ added in v1.0.1
func (User_Status) Type() protoreflect.EnumType