Documentation ¶
Index ¶
- Constants
- Variables
- type CreateSecretRequest
- func (*CreateSecretRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateSecretRequest) GetKey() string
- func (x *CreateSecretRequest) GetRegions() []string
- func (x *CreateSecretRequest) GetResourceTypes() []resource.TYPE
- func (x *CreateSecretRequest) GetType() Type
- func (x *CreateSecretRequest) GetValue() string
- func (*CreateSecretRequest) ProtoMessage()
- func (x *CreateSecretRequest) ProtoReflect() protoreflect.Message
- func (x *CreateSecretRequest) Reset()
- func (x *CreateSecretRequest) String() string
- type DescribeSecretRequest
- func (*DescribeSecretRequest) Descriptor() ([]byte, []int)deprecated
- func (x *DescribeSecretRequest) GetId() string
- func (*DescribeSecretRequest) ProtoMessage()
- func (x *DescribeSecretRequest) ProtoReflect() protoreflect.Message
- func (x *DescribeSecretRequest) Reset()
- func (x *DescribeSecretRequest) String() string
- type Secret
- func (s *Secret) Decrypt(key string) error
- func (*Secret) Descriptor() ([]byte, []int)deprecated
- func (s *Secret) Desense()
- func (s *Secret) Encrypt(key string) error
- func (x *Secret) GetDomain() string
- func (x *Secret) GetId() string
- func (x *Secret) GetNamespace() string
- func (x *Secret) GetSpec() *CreateSecretRequest
- func (*Secret) ProtoMessage()
- func (x *Secret) ProtoReflect() protoreflect.Message
- func (x *Secret) Reset()
- func (x *Secret) String() string
- type Service
- type SyncResourceHandler
- type SyncResourceRequest
- type SyncResponse
- type Type
Constants ¶
View Source
const (
AppName = "secret"
)
Variables ¶
View Source
var ( Type_name = map[int32]string{ 0: "API_KEY", 1: "USER_PASSWORD", } Type_value = map[string]int32{ "API_KEY": 0, "USER_PASSWORD": 1, } )
Enum value maps for Type.
View Source
var File_cmdb_apps_secret_pb_model_proto protoreflect.FileDescriptor
View Source
var File_cmdb_apps_secret_pb_rpc_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type CreateSecretRequest ¶
type CreateSecretRequest struct { // 凭证的类型 // @gotags: json:"type" Type Type `protobuf:"varint,1,opt,name=type,proto3,enum=go12.cmdb.secret.Type" json:"type"` // @gotags: json:"key" validate:"required" Key string `protobuf:"bytes,2,opt,name=key,proto3" json:"key" validate:"required"` // @gotags: json:"value" validate:"required" Value string `protobuf:"bytes,3,opt,name=value,proto3" json:"value" validate:"required"` // 允许同步的资源的Region列表 // @gotags: json:"regions" Regions []string `protobuf:"bytes,4,rep,name=regions,proto3" json:"regions"` // 允许同步的资源的类型 // @gotags: json:"resource_types" ResourceTypes []resource.TYPE `` /* 127-byte string literal not displayed */ // contains filtered or unexported fields }
func NewCreateSecretRequest ¶
func NewCreateSecretRequest() *CreateSecretRequest
func (*CreateSecretRequest) Descriptor
deprecated
func (*CreateSecretRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateSecretRequest.ProtoReflect.Descriptor instead.
func (*CreateSecretRequest) GetKey ¶
func (x *CreateSecretRequest) GetKey() string
func (*CreateSecretRequest) GetRegions ¶
func (x *CreateSecretRequest) GetRegions() []string
func (*CreateSecretRequest) GetResourceTypes ¶
func (x *CreateSecretRequest) GetResourceTypes() []resource.TYPE
func (*CreateSecretRequest) GetType ¶
func (x *CreateSecretRequest) GetType() Type
func (*CreateSecretRequest) GetValue ¶
func (x *CreateSecretRequest) GetValue() string
func (*CreateSecretRequest) ProtoMessage ¶
func (*CreateSecretRequest) ProtoMessage()
func (*CreateSecretRequest) ProtoReflect ¶
func (x *CreateSecretRequest) ProtoReflect() protoreflect.Message
func (*CreateSecretRequest) Reset ¶
func (x *CreateSecretRequest) Reset()
func (*CreateSecretRequest) String ¶
func (x *CreateSecretRequest) String() string
type DescribeSecretRequest ¶
type DescribeSecretRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*DescribeSecretRequest) Descriptor
deprecated
func (*DescribeSecretRequest) Descriptor() ([]byte, []int)
Deprecated: Use DescribeSecretRequest.ProtoReflect.Descriptor instead.
func (*DescribeSecretRequest) GetId ¶
func (x *DescribeSecretRequest) GetId() string
func (*DescribeSecretRequest) ProtoMessage ¶
func (*DescribeSecretRequest) ProtoMessage()
func (*DescribeSecretRequest) ProtoReflect ¶
func (x *DescribeSecretRequest) ProtoReflect() protoreflect.Message
func (*DescribeSecretRequest) Reset ¶
func (x *DescribeSecretRequest) Reset()
func (*DescribeSecretRequest) String ¶
func (x *DescribeSecretRequest) String() string
type Secret ¶
type Secret struct { // secret id // @gotags: json:"id" bson:"_id" Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id" bson:"_id"` // secret id // @gotags: json:"domain" bson:"domain" Domain string `protobuf:"bytes,2,opt,name=domain,proto3" json:"domain" bson:"domain"` // secret id // @gotags: json:"namespace" bson:"namespace" Namespace string `protobuf:"bytes,3,opt,name=namespace,proto3" json:"namespace" bson:"namespace"` // 创建secret的请求 Spec *CreateSecretRequest `protobuf:"bytes,4,opt,name=spec,proto3" json:"spec,omitempty"` // contains filtered or unexported fields }
func NewSecret ¶
func NewSecret(req *CreateSecretRequest) *Secret
func (*Secret) Descriptor
deprecated
func (*Secret) GetNamespace ¶
func (*Secret) GetSpec ¶
func (x *Secret) GetSpec() *CreateSecretRequest
func (*Secret) ProtoMessage ¶
func (*Secret) ProtoMessage()
func (*Secret) ProtoReflect ¶
func (x *Secret) ProtoReflect() protoreflect.Message
type Service ¶
type Service interface { // 录入云商凭证 CreateSecret(context.Context, *CreateSecretRequest) (*Secret, error) // 查询云商凭证 DescribeSecret(context.Context, *DescribeSecretRequest) (*Secret, error) // 使用云商凭证同步资源 Stream SyncResource(context.Context, *SyncResourceRequest, SyncResourceHandler) error }
type SyncResourceRequest ¶
type SyncResponse ¶
type Type ¶
type Type int32
func (Type) Descriptor ¶
func (Type) Descriptor() protoreflect.EnumDescriptor
func (Type) EnumDescriptor
deprecated
func (Type) Number ¶
func (x Type) Number() protoreflect.EnumNumber
func (Type) Type ¶
func (Type) Type() protoreflect.EnumType
Click to show internal directories.
Click to hide internal directories.