Documentation ¶
Overview ¶
Package secrets is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterSecretsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterSecretsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecretsServiceClient) error
- func RegisterSecretsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterSecretsServiceServer(s *grpc.Server, srv SecretsServiceServer)
- func UnmarshalGcpServiceAcc(gcpJsonCred string) (gcpCred *types.GcpCredential, err error)
- type DeleteResponse
- func (*DeleteResponse) Descriptor() ([]byte, []int)
- func (*DeleteResponse) ProtoMessage()
- func (m *DeleteResponse) Reset()
- func (m *DeleteResponse) String() string
- func (m *DeleteResponse) XXX_DiscardUnknown()
- func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *DeleteResponse) XXX_Merge(src proto.Message)
- func (m *DeleteResponse) XXX_Size() int
- func (m *DeleteResponse) XXX_Unmarshal(b []byte) error
- type Filter
- func (*Filter) Descriptor() ([]byte, []int)
- func (m *Filter) GetExclude() bool
- func (m *Filter) GetKey() string
- func (m *Filter) GetValues() []string
- func (*Filter) ProtoMessage()
- func (m *Filter) Reset()
- func (m *Filter) String() string
- func (m *Filter) XXX_DiscardUnknown()
- func (m *Filter) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Filter) XXX_Merge(src proto.Message)
- func (m *Filter) XXX_Size() int
- func (m *Filter) XXX_Unmarshal(b []byte) error
- type Id
- func (*Id) Descriptor() ([]byte, []int)
- func (m *Id) GetId() string
- func (*Id) ProtoMessage()
- func (m *Id) Reset()
- func (m *Id) String() string
- func (m *Id) XXX_DiscardUnknown()
- func (m *Id) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Id) XXX_Merge(src proto.Message)
- func (m *Id) XXX_Size() int
- func (m *Id) XXX_Unmarshal(b []byte) error
- type Kv
- func (*Kv) Descriptor() ([]byte, []int)
- func (m *Kv) GetKey() string
- func (m *Kv) GetValue() string
- func (*Kv) ProtoMessage()
- func (m *Kv) Reset()
- func (m *Kv) String() string
- func (m *Kv) XXX_DiscardUnknown()
- func (m *Kv) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Kv) XXX_Merge(src proto.Message)
- func (m *Kv) XXX_Size() int
- func (m *Kv) XXX_Unmarshal(b []byte) error
- type Query
- func (*Query) Descriptor() ([]byte, []int)
- func (m *Query) GetFilters() []*Filter
- func (m *Query) GetOrder() Query_OrderType
- func (m *Query) GetPage() int32
- func (m *Query) GetPerPage() int32
- func (m *Query) GetSort() string
- func (*Query) ProtoMessage()
- func (m *Query) Reset()
- func (m *Query) String() string
- func (m *Query) XXX_DiscardUnknown()
- func (m *Query) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Query) XXX_Merge(src proto.Message)
- func (m *Query) XXX_Size() int
- func (m *Query) XXX_Unmarshal(b []byte) error
- type Query_OrderType
- type Secret
- func (*Secret) Descriptor() ([]byte, []int)
- func (m *Secret) GetData() []*Kv
- func (m *Secret) GetId() string
- func (m *Secret) GetLastModified() *timestamp.Timestamp
- func (m *Secret) GetName() string
- func (m *Secret) GetTags() []*Kv
- func (m *Secret) GetType() string
- func (s *Secret) Merge(newSecret *Secret)
- func (*Secret) ProtoMessage()
- func (m *Secret) Reset()
- func (m *Secret) String() string
- func (s *Secret) Validate() error
- func (m *Secret) XXX_DiscardUnknown()
- func (m *Secret) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Secret) XXX_Merge(src proto.Message)
- func (m *Secret) XXX_Size() int
- func (m *Secret) XXX_Unmarshal(b []byte) error
- type Secrets
- func (*Secrets) Descriptor() ([]byte, []int)
- func (m *Secrets) GetSecrets() []*Secret
- func (m *Secrets) GetTotal() int32
- func (*Secrets) ProtoMessage()
- func (m *Secrets) Reset()
- func (m *Secrets) String() string
- func (m *Secrets) XXX_DiscardUnknown()
- func (m *Secrets) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *Secrets) XXX_Merge(src proto.Message)
- func (m *Secrets) XXX_Size() int
- func (m *Secrets) XXX_Unmarshal(b []byte) error
- type SecretsServiceClient
- type SecretsServiceServer
- type UpdateResponse
- func (*UpdateResponse) Descriptor() ([]byte, []int)
- func (*UpdateResponse) ProtoMessage()
- func (m *UpdateResponse) Reset()
- func (m *UpdateResponse) String() string
- func (m *UpdateResponse) XXX_DiscardUnknown()
- func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
- func (dst *UpdateResponse) XXX_Merge(src proto.Message)
- func (m *UpdateResponse) XXX_Size() int
- func (m *UpdateResponse) XXX_Unmarshal(b []byte) error
Constants ¶
This section is empty.
Variables ¶
var Query_OrderType_name = map[int32]string{
0: "ASC",
1: "DESC",
}
var Query_OrderType_value = map[string]int32{
"ASC": 0,
"DESC": 1,
}
Functions ¶
func RegisterSecretsServiceHandler ¶
func RegisterSecretsServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterSecretsServiceHandler registers the http handlers for service SecretsService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterSecretsServiceHandlerClient ¶
func RegisterSecretsServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecretsServiceClient) error
RegisterSecretsServiceHandlerClient registers the http handlers for service SecretsService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SecretsServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SecretsServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SecretsServiceClient" to call the correct interceptors.
func RegisterSecretsServiceHandlerFromEndpoint ¶
func RegisterSecretsServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterSecretsServiceHandlerFromEndpoint is same as RegisterSecretsServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterSecretsServiceServer ¶
func RegisterSecretsServiceServer(s *grpc.Server, srv SecretsServiceServer)
func UnmarshalGcpServiceAcc ¶
func UnmarshalGcpServiceAcc(gcpJsonCred string) (gcpCred *types.GcpCredential, err error)
UnmarshalGcpServiceAcc receives the GCP credential as a json string, unmarshals it and verifies that it's a service account, recommended by Google for API integrations
Types ¶
type DeleteResponse ¶
type DeleteResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*DeleteResponse) Descriptor ¶
func (*DeleteResponse) Descriptor() ([]byte, []int)
func (*DeleteResponse) ProtoMessage ¶
func (*DeleteResponse) ProtoMessage()
func (*DeleteResponse) Reset ¶
func (m *DeleteResponse) Reset()
func (*DeleteResponse) String ¶
func (m *DeleteResponse) String() string
func (*DeleteResponse) XXX_DiscardUnknown ¶
func (m *DeleteResponse) XXX_DiscardUnknown()
func (*DeleteResponse) XXX_Marshal ¶
func (m *DeleteResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*DeleteResponse) XXX_Merge ¶
func (dst *DeleteResponse) XXX_Merge(src proto.Message)
func (*DeleteResponse) XXX_Size ¶
func (m *DeleteResponse) XXX_Size() int
func (*DeleteResponse) XXX_Unmarshal ¶
func (m *DeleteResponse) XXX_Unmarshal(b []byte) error
type Filter ¶
type Filter struct { Key string `protobuf:"bytes,20,opt,name=key,proto3" json:"key,omitempty"` Exclude bool `protobuf:"varint,22,opt,name=exclude,proto3" json:"exclude,omitempty"` Values []string `protobuf:"bytes,23,rep,name=values,proto3" json:"values,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Filter) Descriptor ¶
func (*Filter) GetExclude ¶
func (*Filter) ProtoMessage ¶
func (*Filter) ProtoMessage()
func (*Filter) XXX_DiscardUnknown ¶
func (m *Filter) XXX_DiscardUnknown()
func (*Filter) XXX_Marshal ¶
func (*Filter) XXX_Unmarshal ¶
type Id ¶
type Id struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Id) Descriptor ¶
func (*Id) ProtoMessage ¶
func (*Id) ProtoMessage()
func (*Id) XXX_DiscardUnknown ¶
func (m *Id) XXX_DiscardUnknown()
func (*Id) XXX_Unmarshal ¶
type Kv ¶
type Kv struct { Key string `protobuf:"bytes,1,opt,name=key,proto3" json:"key,omitempty"` Value string `protobuf:"bytes,2,opt,name=value,proto3" json:"value,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Kv) Descriptor ¶
func (*Kv) ProtoMessage ¶
func (*Kv) ProtoMessage()
func (*Kv) XXX_DiscardUnknown ¶
func (m *Kv) XXX_DiscardUnknown()
func (*Kv) XXX_Unmarshal ¶
type Query ¶
type Query struct { Filters []*Filter `protobuf:"bytes,20,rep,name=filters,proto3" json:"filters,omitempty"` Order Query_OrderType `protobuf:"varint,21,opt,name=order,proto3,enum=chef.automate.api.secrets.Query_OrderType" json:"order,omitempty"` Sort string `protobuf:"bytes,22,opt,name=sort,proto3" json:"sort,omitempty"` Page int32 `protobuf:"varint,23,opt,name=page,proto3" json:"page,omitempty"` PerPage int32 `protobuf:"varint,24,opt,name=per_page,json=perPage,proto3" json:"per_page,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Query) Descriptor ¶
func (*Query) GetFilters ¶
func (*Query) GetOrder ¶
func (m *Query) GetOrder() Query_OrderType
func (*Query) GetPerPage ¶
func (*Query) ProtoMessage ¶
func (*Query) ProtoMessage()
func (*Query) XXX_DiscardUnknown ¶
func (m *Query) XXX_DiscardUnknown()
func (*Query) XXX_Marshal ¶
func (*Query) XXX_Unmarshal ¶
type Query_OrderType ¶
type Query_OrderType int32
const ( Query_ASC Query_OrderType = 0 Query_DESC Query_OrderType = 1 )
func (Query_OrderType) EnumDescriptor ¶
func (Query_OrderType) EnumDescriptor() ([]byte, []int)
func (Query_OrderType) String ¶
func (x Query_OrderType) String() string
type Secret ¶
type Secret struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Type string `protobuf:"bytes,3,opt,name=type,proto3" json:"type,omitempty"` LastModified *timestamp.Timestamp `protobuf:"bytes,20,opt,name=last_modified,json=lastModified,proto3" json:"last_modified,omitempty"` Tags []*Kv `protobuf:"bytes,21,rep,name=tags,proto3" json:"tags,omitempty"` Data []*Kv `protobuf:"bytes,22,rep,name=data,proto3" json:"data,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Secret) Descriptor ¶
func (*Secret) GetLastModified ¶
func (*Secret) Merge ¶
Merge combines the existing secret with fields from the new secret. Fields they have in common will replaced with the fields from new. Fields found in the Data attribute will not be removed from old if they are not found in new.
func (*Secret) ProtoMessage ¶
func (*Secret) ProtoMessage()
func (*Secret) Validate ¶
Validate validates a Secret and returns the first validation error encountered.
func (*Secret) XXX_DiscardUnknown ¶
func (m *Secret) XXX_DiscardUnknown()
func (*Secret) XXX_Marshal ¶
func (*Secret) XXX_Unmarshal ¶
type Secrets ¶
type Secrets struct { Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"` Total int32 `protobuf:"varint,20,opt,name=total,proto3" json:"total,omitempty"` XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*Secrets) Descriptor ¶
func (*Secrets) GetSecrets ¶
func (*Secrets) ProtoMessage ¶
func (*Secrets) ProtoMessage()
func (*Secrets) XXX_DiscardUnknown ¶
func (m *Secrets) XXX_DiscardUnknown()
func (*Secrets) XXX_Marshal ¶
func (*Secrets) XXX_Unmarshal ¶
type SecretsServiceClient ¶
type SecretsServiceClient interface { Create(ctx context.Context, in *Secret, opts ...grpc.CallOption) (*Id, error) Read(ctx context.Context, in *Id, opts ...grpc.CallOption) (*Secret, error) Update(ctx context.Context, in *Secret, opts ...grpc.CallOption) (*UpdateResponse, error) Delete(ctx context.Context, in *Id, opts ...grpc.CallOption) (*DeleteResponse, error) List(ctx context.Context, in *Query, opts ...grpc.CallOption) (*Secrets, error) }
SecretsServiceClient is the client API for SecretsService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewSecretsServiceClient ¶
func NewSecretsServiceClient(cc *grpc.ClientConn) SecretsServiceClient
type SecretsServiceServer ¶
type SecretsServiceServer interface { Create(context.Context, *Secret) (*Id, error) Read(context.Context, *Id) (*Secret, error) Update(context.Context, *Secret) (*UpdateResponse, error) Delete(context.Context, *Id) (*DeleteResponse, error) List(context.Context, *Query) (*Secrets, error) }
SecretsServiceServer is the server API for SecretsService service.
type UpdateResponse ¶
type UpdateResponse struct { XXX_NoUnkeyedLiteral struct{} `json:"-"` XXX_unrecognized []byte `json:"-"` XXX_sizecache int32 `json:"-"` }
func (*UpdateResponse) Descriptor ¶
func (*UpdateResponse) Descriptor() ([]byte, []int)
func (*UpdateResponse) ProtoMessage ¶
func (*UpdateResponse) ProtoMessage()
func (*UpdateResponse) Reset ¶
func (m *UpdateResponse) Reset()
func (*UpdateResponse) String ¶
func (m *UpdateResponse) String() string
func (*UpdateResponse) XXX_DiscardUnknown ¶
func (m *UpdateResponse) XXX_DiscardUnknown()
func (*UpdateResponse) XXX_Marshal ¶
func (m *UpdateResponse) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)
func (*UpdateResponse) XXX_Merge ¶
func (dst *UpdateResponse) XXX_Merge(src proto.Message)
func (*UpdateResponse) XXX_Size ¶
func (m *UpdateResponse) XXX_Size() int
func (*UpdateResponse) XXX_Unmarshal ¶
func (m *UpdateResponse) XXX_Unmarshal(b []byte) error