secret

package
v0.14.0 Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2017 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Overview

Package secret is a generated protocol buffer package.

It is generated from these files:

github.com/appcelerator/amp/api/rpc/secret/secret.proto

It has these top-level messages:

SecretSpec
Secret
CreateSecretRequest
CreateSecretResponse
ListSecretsRequest
ListSecretsResponse
RemoveSecretRequest
RemoveSecretResponse

Index

Constants

View Source
const MaxSecretSize = 500 * 1024 // 500KB

MaxSecretSize is the maximum byte length of the `Secret.Spec.Data` field.

Variables

This section is empty.

Functions

func RegisterSecretServiceServer

func RegisterSecretServiceServer(s *grpc.Server, srv SecretServiceServer)

Types

type CreateSecretRequest

type CreateSecretRequest struct {
	Spec *SecretSpec `protobuf:"bytes,1,opt,name=spec" json:"spec,omitempty"`
}

CreateSecretRequest specifies a new secret (it will not update an existing secret) to create. from: api/control.proto

func (*CreateSecretRequest) Descriptor

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

func (*CreateSecretRequest) GetSpec

func (m *CreateSecretRequest) GetSpec() *SecretSpec

func (*CreateSecretRequest) ProtoMessage

func (*CreateSecretRequest) ProtoMessage()

func (*CreateSecretRequest) Reset

func (m *CreateSecretRequest) Reset()

func (*CreateSecretRequest) String

func (m *CreateSecretRequest) String() string

type CreateSecretResponse

type CreateSecretResponse struct {
	Secret *Secret `protobuf:"bytes,1,opt,name=secret" json:"secret,omitempty"`
}

CreateSecretResponse contains the newly created `Secret` corresponding to the name in `CreateSecretRequest`. The `Secret.Spec.Data` field should be nil instead of actually containing the secret bytes. from: api/control.proto

func (*CreateSecretResponse) Descriptor

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

func (*CreateSecretResponse) GetSecret

func (m *CreateSecretResponse) GetSecret() *Secret

func (*CreateSecretResponse) ProtoMessage

func (*CreateSecretResponse) ProtoMessage()

func (*CreateSecretResponse) Reset

func (m *CreateSecretResponse) Reset()

func (*CreateSecretResponse) String

func (m *CreateSecretResponse) String() string

type ListSecretsRequest

type ListSecretsRequest struct {
	Filters *ListSecretsRequest_Filters `protobuf:"bytes,1,opt,name=filters" json:"filters,omitempty"`
}

ListSecretRequest is the request to list all non-internal secrets in the secret store, or all secrets filtered by (name or name prefix or id prefix) and labels. from: api/control.proto

func (*ListSecretsRequest) Descriptor

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

func (*ListSecretsRequest) GetFilters

func (*ListSecretsRequest) ProtoMessage

func (*ListSecretsRequest) ProtoMessage()

func (*ListSecretsRequest) Reset

func (m *ListSecretsRequest) Reset()

func (*ListSecretsRequest) String

func (m *ListSecretsRequest) String() string

type ListSecretsRequest_Filters

type ListSecretsRequest_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 (*ListSecretsRequest_Filters) Descriptor

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

func (*ListSecretsRequest_Filters) GetIdPrefixes

func (m *ListSecretsRequest_Filters) GetIdPrefixes() []string

func (*ListSecretsRequest_Filters) GetLabels

func (m *ListSecretsRequest_Filters) GetLabels() map[string]string

func (*ListSecretsRequest_Filters) GetNamePrefixes

func (m *ListSecretsRequest_Filters) GetNamePrefixes() []string

func (*ListSecretsRequest_Filters) GetNames

func (m *ListSecretsRequest_Filters) GetNames() []string

func (*ListSecretsRequest_Filters) ProtoMessage

func (*ListSecretsRequest_Filters) ProtoMessage()

func (*ListSecretsRequest_Filters) Reset

func (m *ListSecretsRequest_Filters) Reset()

func (*ListSecretsRequest_Filters) String

func (m *ListSecretsRequest_Filters) String() string

type ListSecretsResponse

type ListSecretsResponse struct {
	Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets" json:"secrets,omitempty"`
}

ListSecretResponse contains a list of all the secrets that match the name or name prefix filters provided in `ListSecretRequest`. The `Secret.Spec.Data` field in each `Secret` object should be nil instead of actually containing the secret bytes. from: api/control.proto

func (*ListSecretsResponse) Descriptor

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

func (*ListSecretsResponse) GetSecrets

func (m *ListSecretsResponse) GetSecrets() []*Secret

func (*ListSecretsResponse) ProtoMessage

func (*ListSecretsResponse) ProtoMessage()

func (*ListSecretsResponse) Reset

func (m *ListSecretsResponse) Reset()

func (*ListSecretsResponse) String

func (m *ListSecretsResponse) String() string

type RemoveSecretRequest

type RemoveSecretRequest struct {
	SecretId string `protobuf:"bytes,1,opt,name=secret_id,json=secretId" json:"secret_id,omitempty"`
}

RemoveSecretRequest contains the ID of the secret that should be removed. This removes all versions of the secret. From: api/control.proto

func (*RemoveSecretRequest) Descriptor

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

func (*RemoveSecretRequest) GetSecretId

func (m *RemoveSecretRequest) GetSecretId() string

func (*RemoveSecretRequest) ProtoMessage

func (*RemoveSecretRequest) ProtoMessage()

func (*RemoveSecretRequest) Reset

func (m *RemoveSecretRequest) Reset()

func (*RemoveSecretRequest) String

func (m *RemoveSecretRequest) String() string

type RemoveSecretResponse

type RemoveSecretResponse struct {
	SecretId string `protobuf:"bytes,1,opt,name=secret_id,json=secretId" json:"secret_id,omitempty"`
}

RemoveSecretResponse contains the ID of the secret that was successfully removed. From: api/control.proto

func (*RemoveSecretResponse) Descriptor

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

func (*RemoveSecretResponse) GetSecretId

func (m *RemoveSecretResponse) GetSecretId() string

func (*RemoveSecretResponse) ProtoMessage

func (*RemoveSecretResponse) ProtoMessage()

func (*RemoveSecretResponse) Reset

func (m *RemoveSecretResponse) Reset()

func (*RemoveSecretResponse) String

func (m *RemoveSecretResponse) String() string

type Secret

type Secret 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 secret data, as well as any context around the
	// secret data that the user provides.
	Spec *SecretSpec `protobuf:"bytes,3,opt,name=spec" json:"spec,omitempty"`
	// Whether the secret is an internal secret (not set by a user) or not.
	Internal bool `protobuf:"varint,4,opt,name=internal" json:"internal,omitempty"`
}

Secret represents a secret that should be passed to a container or a node, and is immutable. from: api/objects.proto

func (*Secret) Descriptor

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

func (*Secret) GetId

func (m *Secret) GetId() string

func (*Secret) GetInternal

func (m *Secret) GetInternal() bool

func (*Secret) GetMeta

func (m *Secret) GetMeta() *types.Meta

func (*Secret) GetSpec

func (m *Secret) GetSpec() *SecretSpec

func (*Secret) ProtoMessage

func (*Secret) ProtoMessage()

func (*Secret) Reset

func (m *Secret) Reset()

func (*Secret) String

func (m *Secret) String() string

type SecretServiceClient

type SecretServiceClient interface {
	// CreateSecret creates and return a `CreateSecretResponse` with a `Secret` based
	// on the provided `CreateSecretRequest.SecretSpec`.
	// - Returns `InvalidArgument` if the `CreateSecretRequest.SecretSpec` 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
	CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*CreateSecretResponse, error)
	// ListSecrets returns a `ListSecretResponse` with a list of all non-internal `Secret`s being
	// managed, or all secrets matching any name in `ListSecretsRequest.Names`, any
	// name prefix in `ListSecretsRequest.NamePrefixes`, any id in
	// `ListSecretsRequest.SecretIDs`, or any id prefix in `ListSecretsRequest.IDPrefixes`.
	// - Returns an error if listing fails.
	// From: api/control.proto
	ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error)
	// RemoveSecret removes the secret referenced by `RemoveSecretRequest.ID`.
	// - Returns `InvalidArgument` if `RemoveSecretRequest.ID` is empty.
	// - Returns `NotFound` if the a secret named `RemoveSecretRequest.ID` is not found.
	// - Returns an error if the deletion fails.
	// From: api/control.proto
	RemoveSecret(ctx context.Context, in *RemoveSecretRequest, opts ...grpc.CallOption) (*RemoveSecretResponse, error)
}

func NewSecretServiceClient

func NewSecretServiceClient(cc *grpc.ClientConn) SecretServiceClient

type SecretServiceServer

type SecretServiceServer interface {
	// CreateSecret creates and return a `CreateSecretResponse` with a `Secret` based
	// on the provided `CreateSecretRequest.SecretSpec`.
	// - Returns `InvalidArgument` if the `CreateSecretRequest.SecretSpec` 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
	CreateSecret(context.Context, *CreateSecretRequest) (*CreateSecretResponse, error)
	// ListSecrets returns a `ListSecretResponse` with a list of all non-internal `Secret`s being
	// managed, or all secrets matching any name in `ListSecretsRequest.Names`, any
	// name prefix in `ListSecretsRequest.NamePrefixes`, any id in
	// `ListSecretsRequest.SecretIDs`, or any id prefix in `ListSecretsRequest.IDPrefixes`.
	// - Returns an error if listing fails.
	// From: api/control.proto
	ListSecrets(context.Context, *ListSecretsRequest) (*ListSecretsResponse, error)
	// RemoveSecret removes the secret referenced by `RemoveSecretRequest.ID`.
	// - Returns `InvalidArgument` if `RemoveSecretRequest.ID` is empty.
	// - Returns `NotFound` if the a secret named `RemoveSecretRequest.ID` is not found.
	// - Returns an error if the deletion fails.
	// From: api/control.proto
	RemoveSecret(context.Context, *RemoveSecretRequest) (*RemoveSecretResponse, error)
}

type SecretSpec

type SecretSpec struct {
	Annotations *types.Annotations `protobuf:"bytes,1,opt,name=annotations" json:"annotations,omitempty"`
	// Data is the secret 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"`
}

SecretSpec specifies a user-provided secret. from: api/specs.proto

func (*SecretSpec) Descriptor

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

func (*SecretSpec) GetAnnotations

func (m *SecretSpec) GetAnnotations() *types.Annotations

func (*SecretSpec) GetData

func (m *SecretSpec) GetData() []byte

func (*SecretSpec) GetTemplating

func (m *SecretSpec) GetTemplating() *types.Driver

func (*SecretSpec) ProtoMessage

func (*SecretSpec) ProtoMessage()

func (*SecretSpec) Reset

func (m *SecretSpec) Reset()

func (*SecretSpec) String

func (m *SecretSpec) String() string

type Server

type Server struct {
	Docker *docker.Docker
}

func (*Server) CreateSecret

func (s *Server) CreateSecret(ctx context.Context, request *CreateSecretRequest) (*CreateSecretResponse, error)

CreateSecret creates and return a `CreateSecretResponse` with a `Secret` based on the provided `CreateSecretRequest.SecretSpec`.

  • Returns `InvalidArgument` if the `CreateSecretRequest.SecretSpec` 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) ListSecrets

func (s *Server) ListSecrets(ctx context.Context, request *ListSecretsRequest) (*ListSecretsResponse, error)

ListSecrets returns a `ListSecretResponse` with a list all non-internal `Secret`s being managed, or all secrets matching any name in `ListSecretsRequest.Names`, any name prefix in `ListSecretsRequest.NamePrefixes`, any id in `ListSecretsRequest.SecretIDs`, or any id prefix in `ListSecretsRequest.IDPrefixes`. - Returns an error if listing fails. From: api/control.proto

func (*Server) RemoveSecret

func (s *Server) RemoveSecret(ctx context.Context, request *RemoveSecretRequest) (*RemoveSecretResponse, error)

RemoveSecret removes the secret referenced by `RemoveSecretRequest.ID`. - Returns `InvalidArgument` if `RemoveSecretRequest.ID` is empty. - Returns `NotFound` if the a secret named `RemoveSecretRequest.ID` is not found. - Returns an error if the deletion fails. From: api/control.proto

Jump to

Keyboard shortcuts

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