Documentation ¶
Overview ¶
Package config is a generated protocol buffer package.
It is generated from these files:
github.com/appcelerator/amp/api/rpc/config/config.proto
It has these top-level messages:
ConfigSpec Config CreateConfigRequest CreateConfigResponse GetConfigRequest GetConfigResponse ListConfigsRequest ListConfigsResponse RemoveConfigRequest RemoveConfigResponse
Index ¶
- Constants
- func RegisterConfigServiceServer(s *grpc.Server, srv ConfigServiceServer)
- type Config
- type ConfigServiceClient
- type ConfigServiceServer
- type ConfigSpec
- type CreateConfigRequest
- type CreateConfigResponse
- type GetConfigRequest
- type GetConfigResponse
- type ListConfigsRequest
- type ListConfigsRequest_Filters
- func (*ListConfigsRequest_Filters) Descriptor() ([]byte, []int)
- func (m *ListConfigsRequest_Filters) GetIdPrefixes() []string
- func (m *ListConfigsRequest_Filters) GetLabels() map[string]string
- func (m *ListConfigsRequest_Filters) GetNamePrefixes() []string
- func (m *ListConfigsRequest_Filters) GetNames() []string
- func (*ListConfigsRequest_Filters) ProtoMessage()
- func (m *ListConfigsRequest_Filters) Reset()
- func (m *ListConfigsRequest_Filters) String() string
- type ListConfigsResponse
- type RemoveConfigRequest
- type RemoveConfigResponse
- type Server
- func (s *Server) CreateConfig(ctx context.Context, request *CreateConfigRequest) (*CreateConfigResponse, error)
- func (s *Server) ListConfigs(ctx context.Context, request *ListConfigsRequest) (*ListConfigsResponse, error)
- func (s *Server) RemoveConfig(ctx context.Context, request *RemoveConfigRequest) (*RemoveConfigResponse, error)
Constants ¶
const MaxConfigSize = 500 * 1024 // 500KB
MaxConfigSize is the maximum byte length of the `Config.Spec.Data` field.
Variables ¶
This section is empty.
Functions ¶
func RegisterConfigServiceServer ¶
func RegisterConfigServiceServer(s *grpc.Server, srv ConfigServiceServer)
Types ¶
type Config ¶
type Config struct { Id string `protobuf:"bytes,1,opt,name=id" json:"id,omitempty"` Meta *types.Meta `protobuf:"bytes,2,opt,name=meta" json:"meta,omitempty"` // Spec contains the actual config data, as well as any context around the // config data that the user provides. Spec *ConfigSpec `protobuf:"bytes,3,opt,name=spec" json:"spec,omitempty"` }
Config represents a set of configuration files that should be passed to a container. from: api/objects.proto
func (*Config) Descriptor ¶
func (*Config) GetSpec ¶
func (m *Config) GetSpec() *ConfigSpec
func (*Config) ProtoMessage ¶
func (*Config) ProtoMessage()
type ConfigServiceClient ¶
type ConfigServiceClient interface { // CreateConfig creates and return a `CreateConfigResponse` with a `Config` based // on the provided `CreateConfigRequest.ConfigSpec`. // - Returns `InvalidArgument` if the `CreateConfigRequest.ConfigSpec` is malformed, // or if the config data is too long or contains invalid characters. // - Returns an error if the creation fails. CreateConfig(ctx context.Context, in *CreateConfigRequest, opts ...grpc.CallOption) (*CreateConfigResponse, error) // ListConfigs returns a `ListConfigResponse` with a list of `Config`s being // managed, or all configs matching any name in `ListConfigsRequest.Names`, any // name prefix in `ListConfigsRequest.NamePrefixes`, any id in // `ListConfigsRequest.ConfigIDs`, or any id prefix in `ListConfigsRequest.IDPrefixes`. // - Returns an error if listing fails. ListConfigs(ctx context.Context, in *ListConfigsRequest, opts ...grpc.CallOption) (*ListConfigsResponse, error) // RemoveConfig removes the config referenced by `RemoveConfigRequest.ID`. // - Returns `InvalidArgument` if `RemoveConfigRequest.ID` is empty. // - Returns `NotFound` if the a config named `RemoveConfigRequest.ID` is not found. // - Returns an error if the deletion fails. RemoveConfig(ctx context.Context, in *RemoveConfigRequest, opts ...grpc.CallOption) (*RemoveConfigResponse, error) }
func NewConfigServiceClient ¶
func NewConfigServiceClient(cc *grpc.ClientConn) ConfigServiceClient
type ConfigServiceServer ¶
type ConfigServiceServer interface { // CreateConfig creates and return a `CreateConfigResponse` with a `Config` based // on the provided `CreateConfigRequest.ConfigSpec`. // - Returns `InvalidArgument` if the `CreateConfigRequest.ConfigSpec` is malformed, // or if the config data is too long or contains invalid characters. // - Returns an error if the creation fails. CreateConfig(context.Context, *CreateConfigRequest) (*CreateConfigResponse, error) // ListConfigs returns a `ListConfigResponse` with a list of `Config`s being // managed, or all configs matching any name in `ListConfigsRequest.Names`, any // name prefix in `ListConfigsRequest.NamePrefixes`, any id in // `ListConfigsRequest.ConfigIDs`, or any id prefix in `ListConfigsRequest.IDPrefixes`. // - Returns an error if listing fails. ListConfigs(context.Context, *ListConfigsRequest) (*ListConfigsResponse, error) // RemoveConfig removes the config referenced by `RemoveConfigRequest.ID`. // - Returns `InvalidArgument` if `RemoveConfigRequest.ID` is empty. // - Returns `NotFound` if the a config named `RemoveConfigRequest.ID` is not found. // - Returns an error if the deletion fails. RemoveConfig(context.Context, *RemoveConfigRequest) (*RemoveConfigResponse, error) }
type ConfigSpec ¶
type ConfigSpec struct { Annotations *types.Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations,omitempty"` // Data is the config payload - the maximum size is 500KB (that is, 500*1024 bytes) Data []byte `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"` // Templating controls whether and how to evaluate the secret payload as // a template. If it is not set, no templating is used. // // The currently recognized values are: // - golang: Go templating Templating *types.Driver `protobuf:"bytes,3,opt,name=templating" json:"templating,omitempty"` }
ConfigSpec specifies user-provided configuration files. from: api/specs.proto
func (*ConfigSpec) Descriptor ¶
func (*ConfigSpec) Descriptor() ([]byte, []int)
func (*ConfigSpec) GetAnnotations ¶
func (m *ConfigSpec) GetAnnotations() *types.Annotations
func (*ConfigSpec) GetData ¶
func (m *ConfigSpec) GetData() []byte
func (*ConfigSpec) GetTemplating ¶
func (m *ConfigSpec) GetTemplating() *types.Driver
func (*ConfigSpec) ProtoMessage ¶
func (*ConfigSpec) ProtoMessage()
func (*ConfigSpec) Reset ¶
func (m *ConfigSpec) Reset()
func (*ConfigSpec) String ¶
func (m *ConfigSpec) String() string
type CreateConfigRequest ¶
type CreateConfigRequest struct {
Spec *ConfigSpec `protobuf:"bytes,1,opt,name=spec" json:"spec,omitempty"`
}
CreateConfigRequest specifies a new config (it will not update an existing config) to create. from: api/control.proto
func (*CreateConfigRequest) Descriptor ¶
func (*CreateConfigRequest) Descriptor() ([]byte, []int)
func (*CreateConfigRequest) GetSpec ¶
func (m *CreateConfigRequest) GetSpec() *ConfigSpec
func (*CreateConfigRequest) ProtoMessage ¶
func (*CreateConfigRequest) ProtoMessage()
func (*CreateConfigRequest) Reset ¶
func (m *CreateConfigRequest) Reset()
func (*CreateConfigRequest) String ¶
func (m *CreateConfigRequest) String() string
type CreateConfigResponse ¶
type CreateConfigResponse struct {
Config *Config `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
}
CreateConfigResponse contains the newly created `Config` corresponding to the name in `CreateConfigRequest`. from: api/control.proto
func (*CreateConfigResponse) Descriptor ¶
func (*CreateConfigResponse) Descriptor() ([]byte, []int)
func (*CreateConfigResponse) GetConfig ¶
func (m *CreateConfigResponse) GetConfig() *Config
func (*CreateConfigResponse) ProtoMessage ¶
func (*CreateConfigResponse) ProtoMessage()
func (*CreateConfigResponse) Reset ¶
func (m *CreateConfigResponse) Reset()
func (*CreateConfigResponse) String ¶
func (m *CreateConfigResponse) String() string
type GetConfigRequest ¶
type GetConfigRequest struct {
ConfigId string `protobuf:"bytes,1,opt,name=config_id,json=configId" json:"config_id,omitempty"`
}
GetConfigRequest is the request to get a `Config` object given a config id. from: api/control.proto
func (*GetConfigRequest) Descriptor ¶
func (*GetConfigRequest) Descriptor() ([]byte, []int)
func (*GetConfigRequest) GetConfigId ¶
func (m *GetConfigRequest) GetConfigId() string
func (*GetConfigRequest) ProtoMessage ¶
func (*GetConfigRequest) ProtoMessage()
func (*GetConfigRequest) Reset ¶
func (m *GetConfigRequest) Reset()
func (*GetConfigRequest) String ¶
func (m *GetConfigRequest) String() string
type GetConfigResponse ¶
type GetConfigResponse struct {
Config *Config `protobuf:"bytes,1,opt,name=config" json:"config,omitempty"`
}
GetConfigResponse contains the Config corresponding to the id in `GetConfigRequest`. from: api/control.proto
func (*GetConfigResponse) Descriptor ¶
func (*GetConfigResponse) Descriptor() ([]byte, []int)
func (*GetConfigResponse) GetConfig ¶
func (m *GetConfigResponse) GetConfig() *Config
func (*GetConfigResponse) ProtoMessage ¶
func (*GetConfigResponse) ProtoMessage()
func (*GetConfigResponse) Reset ¶
func (m *GetConfigResponse) Reset()
func (*GetConfigResponse) String ¶
func (m *GetConfigResponse) String() string
type ListConfigsRequest ¶
type ListConfigsRequest struct {
Filters *ListConfigsRequest_Filters `protobuf:"bytes,1,opt,name=filters" json:"filters,omitempty"`
}
ListConfigRequest is the request to list all configs in the config store, or all configs filtered by (name or name prefix or id prefix) and labels. from: api/control.proto
func (*ListConfigsRequest) Descriptor ¶
func (*ListConfigsRequest) Descriptor() ([]byte, []int)
func (*ListConfigsRequest) GetFilters ¶
func (m *ListConfigsRequest) GetFilters() *ListConfigsRequest_Filters
func (*ListConfigsRequest) ProtoMessage ¶
func (*ListConfigsRequest) ProtoMessage()
func (*ListConfigsRequest) Reset ¶
func (m *ListConfigsRequest) Reset()
func (*ListConfigsRequest) String ¶
func (m *ListConfigsRequest) String() string
type ListConfigsRequest_Filters ¶
type ListConfigsRequest_Filters struct { Names []string `protobuf:"bytes,1,rep,name=names" json:"names,omitempty"` IdPrefixes []string `protobuf:"bytes,2,rep,name=id_prefixes,json=idPrefixes" json:"id_prefixes,omitempty"` Labels map[string]string `` /* 132-byte string literal not displayed */ NamePrefixes []string `protobuf:"bytes,4,rep,name=name_prefixes,json=namePrefixes" json:"name_prefixes,omitempty"` }
func (*ListConfigsRequest_Filters) Descriptor ¶
func (*ListConfigsRequest_Filters) Descriptor() ([]byte, []int)
func (*ListConfigsRequest_Filters) GetIdPrefixes ¶
func (m *ListConfigsRequest_Filters) GetIdPrefixes() []string
func (*ListConfigsRequest_Filters) GetLabels ¶
func (m *ListConfigsRequest_Filters) GetLabels() map[string]string
func (*ListConfigsRequest_Filters) GetNamePrefixes ¶
func (m *ListConfigsRequest_Filters) GetNamePrefixes() []string
func (*ListConfigsRequest_Filters) GetNames ¶
func (m *ListConfigsRequest_Filters) GetNames() []string
func (*ListConfigsRequest_Filters) ProtoMessage ¶
func (*ListConfigsRequest_Filters) ProtoMessage()
func (*ListConfigsRequest_Filters) Reset ¶
func (m *ListConfigsRequest_Filters) Reset()
func (*ListConfigsRequest_Filters) String ¶
func (m *ListConfigsRequest_Filters) String() string
type ListConfigsResponse ¶
type ListConfigsResponse struct {
Configs []*Config `protobuf:"bytes,1,rep,name=configs" json:"configs,omitempty"`
}
ListConfigResponse contains a list of all the configs that match the name or name prefix filters provided in `ListConfigRequest`. from: api/control.proto
func (*ListConfigsResponse) Descriptor ¶
func (*ListConfigsResponse) Descriptor() ([]byte, []int)
func (*ListConfigsResponse) GetConfigs ¶
func (m *ListConfigsResponse) GetConfigs() []*Config
func (*ListConfigsResponse) ProtoMessage ¶
func (*ListConfigsResponse) ProtoMessage()
func (*ListConfigsResponse) Reset ¶
func (m *ListConfigsResponse) Reset()
func (*ListConfigsResponse) String ¶
func (m *ListConfigsResponse) String() string
type RemoveConfigRequest ¶
type RemoveConfigRequest struct {
ConfigId string `protobuf:"bytes,1,opt,name=config_id,json=configId" json:"config_id,omitempty"`
}
RemoveConfigRequest contains the ID of the config that should be removed. This removes all versions of the config. from: api/control.proto
func (*RemoveConfigRequest) Descriptor ¶
func (*RemoveConfigRequest) Descriptor() ([]byte, []int)
func (*RemoveConfigRequest) GetConfigId ¶
func (m *RemoveConfigRequest) GetConfigId() string
func (*RemoveConfigRequest) ProtoMessage ¶
func (*RemoveConfigRequest) ProtoMessage()
func (*RemoveConfigRequest) Reset ¶
func (m *RemoveConfigRequest) Reset()
func (*RemoveConfigRequest) String ¶
func (m *RemoveConfigRequest) String() string
type RemoveConfigResponse ¶
type RemoveConfigResponse struct {
ConfigId string `protobuf:"bytes,1,opt,name=config_id,json=configId" json:"config_id,omitempty"`
}
RemoveConfigResponse is an empty object indicating the successful removal of a config. from: api/control.proto
func (*RemoveConfigResponse) Descriptor ¶
func (*RemoveConfigResponse) Descriptor() ([]byte, []int)
func (*RemoveConfigResponse) GetConfigId ¶
func (m *RemoveConfigResponse) GetConfigId() string
func (*RemoveConfigResponse) ProtoMessage ¶
func (*RemoveConfigResponse) ProtoMessage()
func (*RemoveConfigResponse) Reset ¶
func (m *RemoveConfigResponse) Reset()
func (*RemoveConfigResponse) String ¶
func (m *RemoveConfigResponse) String() string
type Server ¶
func (*Server) CreateConfig ¶
func (s *Server) CreateConfig(ctx context.Context, request *CreateConfigRequest) (*CreateConfigResponse, error)
CreateConfig creates and return a `CreateConfigResponse` with a `Config` based on the provided `CreateConfigRequest.ConfigSpec`.
- Returns `InvalidArgument` if the `CreateConfigRequest.ConfigSpec` is malformed, or if the secret data is too long or contains invalid characters.
- Returns an error if the creation fails.
From: api/control.proto
func (*Server) ListConfigs ¶
func (s *Server) ListConfigs(ctx context.Context, request *ListConfigsRequest) (*ListConfigsResponse, error)
ListConfigs returns a `ListConfigResponse` with a list all non-internal `Config`s being managed, or all secrets matching any name in `ListConfigsRequest.Names`, any name prefix in `ListConfigsRequest.NamePrefixes`, any id in `ListConfigsRequest.ConfigIDs`, or any id prefix in `ListConfigsRequest.IDPrefixes`. - Returns an error if listing fails. From: api/control.proto
func (*Server) RemoveConfig ¶
func (s *Server) RemoveConfig(ctx context.Context, request *RemoveConfigRequest) (*RemoveConfigResponse, error)
RemoveConfig removes the secret referenced by `RemoveConfigRequest.ID`. - Returns `InvalidArgument` if `RemoveConfigRequest.ID` is empty. - Returns `NotFound` if the a secret named `RemoveConfigRequest.ID` is not found. - Returns an error if the deletion fails. From: api/control.proto