secrets

package
v0.0.34 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package secrets is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

View Source
const (
	Secrets_CreateSecret_FullMethodName   = "/Superplane.Secrets.Secrets/CreateSecret"
	Secrets_DescribeSecret_FullMethodName = "/Superplane.Secrets.Secrets/DescribeSecret"
	Secrets_ListSecrets_FullMethodName    = "/Superplane.Secrets.Secrets/ListSecrets"
	Secrets_UpdateSecret_FullMethodName   = "/Superplane.Secrets.Secrets/UpdateSecret"
	Secrets_DeleteSecret_FullMethodName   = "/Superplane.Secrets.Secrets/DeleteSecret"
)

Variables

View Source
var (
	Secret_Provider_name = map[int32]string{
		0: "PROVIDER_UNKNOWN",
		1: "PROVIDER_LOCAL",
	}
	Secret_Provider_value = map[string]int32{
		"PROVIDER_UNKNOWN": 0,
		"PROVIDER_LOCAL":   1,
	}
)

Enum value maps for Secret_Provider.

View Source
var File_secrets_proto protoreflect.FileDescriptor
View Source
var Secrets_ServiceDesc = grpc.ServiceDesc{
	ServiceName: "Superplane.Secrets.Secrets",
	HandlerType: (*SecretsServer)(nil),
	Methods: []grpc.MethodDesc{
		{
			MethodName: "CreateSecret",
			Handler:    _Secrets_CreateSecret_Handler,
		},
		{
			MethodName: "DescribeSecret",
			Handler:    _Secrets_DescribeSecret_Handler,
		},
		{
			MethodName: "ListSecrets",
			Handler:    _Secrets_ListSecrets_Handler,
		},
		{
			MethodName: "UpdateSecret",
			Handler:    _Secrets_UpdateSecret_Handler,
		},
		{
			MethodName: "DeleteSecret",
			Handler:    _Secrets_DeleteSecret_Handler,
		},
	},
	Streams:  []grpc.StreamDesc{},
	Metadata: "secrets.proto",
}

Secrets_ServiceDesc is the grpc.ServiceDesc for Secrets service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)

Functions

func RegisterSecretsHandler

func RegisterSecretsHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error

RegisterSecretsHandler registers the http handlers for service Secrets to "mux". The handlers forward requests to the grpc endpoint over "conn".

func RegisterSecretsHandlerClient

func RegisterSecretsHandlerClient(ctx context.Context, mux *runtime.ServeMux, client SecretsClient) error

RegisterSecretsHandlerClient registers the http handlers for service Secrets to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "SecretsClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "SecretsClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "SecretsClient" to call the correct interceptors. This client ignores the HTTP middlewares.

func RegisterSecretsHandlerFromEndpoint

func RegisterSecretsHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)

RegisterSecretsHandlerFromEndpoint is same as RegisterSecretsHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.

func RegisterSecretsHandlerServer

func RegisterSecretsHandlerServer(ctx context.Context, mux *runtime.ServeMux, server SecretsServer) error

RegisterSecretsHandlerServer registers the http handlers for service Secrets to "mux". UnaryRPC :call SecretsServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterSecretsHandlerFromEndpoint instead. GRPC interceptors will not work for this type of registration. To use interceptors, you must use the "runtime.WithMiddlewares" option in the "runtime.NewServeMux" call.

func RegisterSecretsServer

func RegisterSecretsServer(s grpc.ServiceRegistrar, srv SecretsServer)

Types

type CreateSecretRequest

type CreateSecretRequest struct {
	Secret     *Secret                  `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
	DomainType authorization.DomainType `` /* 133-byte string literal not displayed */
	DomainId   string                   `protobuf:"bytes,3,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSecretRequest) Descriptor deprecated

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

Deprecated: Use CreateSecretRequest.ProtoReflect.Descriptor instead.

func (*CreateSecretRequest) GetDomainId

func (x *CreateSecretRequest) GetDomainId() string

func (*CreateSecretRequest) GetDomainType

func (x *CreateSecretRequest) GetDomainType() authorization.DomainType

func (*CreateSecretRequest) GetSecret

func (x *CreateSecretRequest) GetSecret() *Secret

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 CreateSecretResponse

type CreateSecretResponse struct {
	Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateSecretResponse) Descriptor deprecated

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

Deprecated: Use CreateSecretResponse.ProtoReflect.Descriptor instead.

func (*CreateSecretResponse) GetSecret

func (x *CreateSecretResponse) GetSecret() *Secret

func (*CreateSecretResponse) ProtoMessage

func (*CreateSecretResponse) ProtoMessage()

func (*CreateSecretResponse) ProtoReflect

func (x *CreateSecretResponse) ProtoReflect() protoreflect.Message

func (*CreateSecretResponse) Reset

func (x *CreateSecretResponse) Reset()

func (*CreateSecretResponse) String

func (x *CreateSecretResponse) String() string

type DeleteSecretRequest

type DeleteSecretRequest struct {
	DomainType authorization.DomainType `` /* 133-byte string literal not displayed */
	DomainId   string                   `protobuf:"bytes,2,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
	IdOrName   string                   `protobuf:"bytes,3,opt,name=id_or_name,json=idOrName,proto3" json:"id_or_name,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteSecretRequest) Descriptor deprecated

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

Deprecated: Use DeleteSecretRequest.ProtoReflect.Descriptor instead.

func (*DeleteSecretRequest) GetDomainId

func (x *DeleteSecretRequest) GetDomainId() string

func (*DeleteSecretRequest) GetDomainType

func (x *DeleteSecretRequest) GetDomainType() authorization.DomainType

func (*DeleteSecretRequest) GetIdOrName

func (x *DeleteSecretRequest) GetIdOrName() string

func (*DeleteSecretRequest) ProtoMessage

func (*DeleteSecretRequest) ProtoMessage()

func (*DeleteSecretRequest) ProtoReflect

func (x *DeleteSecretRequest) ProtoReflect() protoreflect.Message

func (*DeleteSecretRequest) Reset

func (x *DeleteSecretRequest) Reset()

func (*DeleteSecretRequest) String

func (x *DeleteSecretRequest) String() string

type DeleteSecretResponse

type DeleteSecretResponse struct {
	// contains filtered or unexported fields
}

func (*DeleteSecretResponse) Descriptor deprecated

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

Deprecated: Use DeleteSecretResponse.ProtoReflect.Descriptor instead.

func (*DeleteSecretResponse) ProtoMessage

func (*DeleteSecretResponse) ProtoMessage()

func (*DeleteSecretResponse) ProtoReflect

func (x *DeleteSecretResponse) ProtoReflect() protoreflect.Message

func (*DeleteSecretResponse) Reset

func (x *DeleteSecretResponse) Reset()

func (*DeleteSecretResponse) String

func (x *DeleteSecretResponse) String() string

type DescribeSecretRequest

type DescribeSecretRequest struct {
	DomainType authorization.DomainType `` /* 133-byte string literal not displayed */
	DomainId   string                   `protobuf:"bytes,2,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
	IdOrName   string                   `protobuf:"bytes,3,opt,name=id_or_name,json=idOrName,proto3" json:"id_or_name,omitempty"`
	// contains filtered or unexported fields
}

func (*DescribeSecretRequest) Descriptor deprecated

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

Deprecated: Use DescribeSecretRequest.ProtoReflect.Descriptor instead.

func (*DescribeSecretRequest) GetDomainId

func (x *DescribeSecretRequest) GetDomainId() string

func (*DescribeSecretRequest) GetDomainType

func (x *DescribeSecretRequest) GetDomainType() authorization.DomainType

func (*DescribeSecretRequest) GetIdOrName

func (x *DescribeSecretRequest) GetIdOrName() 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 DescribeSecretResponse

type DescribeSecretResponse struct {
	Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
	// contains filtered or unexported fields
}

func (*DescribeSecretResponse) Descriptor deprecated

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

Deprecated: Use DescribeSecretResponse.ProtoReflect.Descriptor instead.

func (*DescribeSecretResponse) GetSecret

func (x *DescribeSecretResponse) GetSecret() *Secret

func (*DescribeSecretResponse) ProtoMessage

func (*DescribeSecretResponse) ProtoMessage()

func (*DescribeSecretResponse) ProtoReflect

func (x *DescribeSecretResponse) ProtoReflect() protoreflect.Message

func (*DescribeSecretResponse) Reset

func (x *DescribeSecretResponse) Reset()

func (*DescribeSecretResponse) String

func (x *DescribeSecretResponse) String() string

type ListSecretsRequest

type ListSecretsRequest struct {
	DomainType authorization.DomainType `` /* 133-byte string literal not displayed */
	DomainId   string                   `protobuf:"bytes,2,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSecretsRequest) Descriptor deprecated

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

Deprecated: Use ListSecretsRequest.ProtoReflect.Descriptor instead.

func (*ListSecretsRequest) GetDomainId

func (x *ListSecretsRequest) GetDomainId() string

func (*ListSecretsRequest) GetDomainType

func (x *ListSecretsRequest) GetDomainType() authorization.DomainType

func (*ListSecretsRequest) ProtoMessage

func (*ListSecretsRequest) ProtoMessage()

func (*ListSecretsRequest) ProtoReflect

func (x *ListSecretsRequest) ProtoReflect() protoreflect.Message

func (*ListSecretsRequest) Reset

func (x *ListSecretsRequest) Reset()

func (*ListSecretsRequest) String

func (x *ListSecretsRequest) String() string

type ListSecretsResponse

type ListSecretsResponse struct {
	Secrets []*Secret `protobuf:"bytes,1,rep,name=secrets,proto3" json:"secrets,omitempty"`
	// contains filtered or unexported fields
}

func (*ListSecretsResponse) Descriptor deprecated

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

Deprecated: Use ListSecretsResponse.ProtoReflect.Descriptor instead.

func (*ListSecretsResponse) GetSecrets

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

func (*ListSecretsResponse) ProtoMessage

func (*ListSecretsResponse) ProtoMessage()

func (*ListSecretsResponse) ProtoReflect

func (x *ListSecretsResponse) ProtoReflect() protoreflect.Message

func (*ListSecretsResponse) Reset

func (x *ListSecretsResponse) Reset()

func (*ListSecretsResponse) String

func (x *ListSecretsResponse) String() string

type Secret

type Secret struct {
	Metadata *Secret_Metadata `protobuf:"bytes,1,opt,name=metadata,proto3" json:"metadata,omitempty"`
	Spec     *Secret_Spec     `protobuf:"bytes,2,opt,name=spec,proto3" json:"spec,omitempty"`
	// contains filtered or unexported fields
}

func (*Secret) Descriptor deprecated

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

Deprecated: Use Secret.ProtoReflect.Descriptor instead.

func (*Secret) GetMetadata

func (x *Secret) GetMetadata() *Secret_Metadata

func (*Secret) GetSpec

func (x *Secret) GetSpec() *Secret_Spec

func (*Secret) ProtoMessage

func (*Secret) ProtoMessage()

func (*Secret) ProtoReflect

func (x *Secret) ProtoReflect() protoreflect.Message

func (*Secret) Reset

func (x *Secret) Reset()

func (*Secret) String

func (x *Secret) String() string

type Secret_Local

type Secret_Local struct {
	Data map[string]string `` /* 135-byte string literal not displayed */
	// contains filtered or unexported fields
}

Local secrets are stored and managed by SuperPlane itself.

func (*Secret_Local) Descriptor deprecated

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

Deprecated: Use Secret_Local.ProtoReflect.Descriptor instead.

func (*Secret_Local) GetData

func (x *Secret_Local) GetData() map[string]string

func (*Secret_Local) ProtoMessage

func (*Secret_Local) ProtoMessage()

func (*Secret_Local) ProtoReflect

func (x *Secret_Local) ProtoReflect() protoreflect.Message

func (*Secret_Local) Reset

func (x *Secret_Local) Reset()

func (*Secret_Local) String

func (x *Secret_Local) String() string

type Secret_Metadata

type Secret_Metadata 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"`
	DomainType authorization.DomainType `` /* 133-byte string literal not displayed */
	DomainId   string                   `protobuf:"bytes,4,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
	CreatedAt  *timestamp.Timestamp     `protobuf:"bytes,5,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"`
	// contains filtered or unexported fields
}

func (*Secret_Metadata) Descriptor deprecated

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

Deprecated: Use Secret_Metadata.ProtoReflect.Descriptor instead.

func (*Secret_Metadata) GetCreatedAt

func (x *Secret_Metadata) GetCreatedAt() *timestamp.Timestamp

func (*Secret_Metadata) GetDomainId

func (x *Secret_Metadata) GetDomainId() string

func (*Secret_Metadata) GetDomainType

func (x *Secret_Metadata) GetDomainType() authorization.DomainType

func (*Secret_Metadata) GetId

func (x *Secret_Metadata) GetId() string

func (*Secret_Metadata) GetName

func (x *Secret_Metadata) GetName() string

func (*Secret_Metadata) ProtoMessage

func (*Secret_Metadata) ProtoMessage()

func (*Secret_Metadata) ProtoReflect

func (x *Secret_Metadata) ProtoReflect() protoreflect.Message

func (*Secret_Metadata) Reset

func (x *Secret_Metadata) Reset()

func (*Secret_Metadata) String

func (x *Secret_Metadata) String() string

type Secret_Provider

type Secret_Provider int32
const (
	Secret_PROVIDER_UNKNOWN Secret_Provider = 0
	Secret_PROVIDER_LOCAL   Secret_Provider = 1
)

func (Secret_Provider) Descriptor

func (Secret_Provider) Enum

func (x Secret_Provider) Enum() *Secret_Provider

func (Secret_Provider) EnumDescriptor deprecated

func (Secret_Provider) EnumDescriptor() ([]byte, []int)

Deprecated: Use Secret_Provider.Descriptor instead.

func (Secret_Provider) Number

func (Secret_Provider) String

func (x Secret_Provider) String() string

func (Secret_Provider) Type

type Secret_Spec

type Secret_Spec struct {
	Provider Secret_Provider `protobuf:"varint,1,opt,name=provider,proto3,enum=Superplane.Secrets.Secret_Provider" json:"provider,omitempty"`
	Local    *Secret_Local   `protobuf:"bytes,2,opt,name=local,proto3" json:"local,omitempty"`
	// contains filtered or unexported fields
}

func (*Secret_Spec) Descriptor deprecated

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

Deprecated: Use Secret_Spec.ProtoReflect.Descriptor instead.

func (*Secret_Spec) GetLocal

func (x *Secret_Spec) GetLocal() *Secret_Local

func (*Secret_Spec) GetProvider

func (x *Secret_Spec) GetProvider() Secret_Provider

func (*Secret_Spec) ProtoMessage

func (*Secret_Spec) ProtoMessage()

func (*Secret_Spec) ProtoReflect

func (x *Secret_Spec) ProtoReflect() protoreflect.Message

func (*Secret_Spec) Reset

func (x *Secret_Spec) Reset()

func (*Secret_Spec) String

func (x *Secret_Spec) String() string

type SecretsClient

type SecretsClient interface {
	CreateSecret(ctx context.Context, in *CreateSecretRequest, opts ...grpc.CallOption) (*CreateSecretResponse, error)
	DescribeSecret(ctx context.Context, in *DescribeSecretRequest, opts ...grpc.CallOption) (*DescribeSecretResponse, error)
	ListSecrets(ctx context.Context, in *ListSecretsRequest, opts ...grpc.CallOption) (*ListSecretsResponse, error)
	UpdateSecret(ctx context.Context, in *UpdateSecretRequest, opts ...grpc.CallOption) (*UpdateSecretResponse, error)
	DeleteSecret(ctx context.Context, in *DeleteSecretRequest, opts ...grpc.CallOption) (*DeleteSecretResponse, error)
}

SecretsClient is the client API for Secrets service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.

func NewSecretsClient

func NewSecretsClient(cc grpc.ClientConnInterface) SecretsClient

type SecretsServer

SecretsServer is the server API for Secrets service. All implementations should embed UnimplementedSecretsServer for forward compatibility.

type UnimplementedSecretsServer

type UnimplementedSecretsServer struct{}

UnimplementedSecretsServer should be embedded to have forward compatible implementations.

NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.

func (UnimplementedSecretsServer) CreateSecret

func (UnimplementedSecretsServer) DeleteSecret

func (UnimplementedSecretsServer) DescribeSecret

func (UnimplementedSecretsServer) ListSecrets

func (UnimplementedSecretsServer) UpdateSecret

type UnsafeSecretsServer

type UnsafeSecretsServer interface {
	// contains filtered or unexported methods
}

UnsafeSecretsServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SecretsServer will result in compilation errors.

type UpdateSecretRequest

type UpdateSecretRequest struct {
	Secret     *Secret                  `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
	IdOrName   string                   `protobuf:"bytes,2,opt,name=id_or_name,json=idOrName,proto3" json:"id_or_name,omitempty"`
	DomainType authorization.DomainType `` /* 133-byte string literal not displayed */
	DomainId   string                   `protobuf:"bytes,4,opt,name=domain_id,json=domainId,proto3" json:"domain_id,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateSecretRequest) Descriptor deprecated

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

Deprecated: Use UpdateSecretRequest.ProtoReflect.Descriptor instead.

func (*UpdateSecretRequest) GetDomainId

func (x *UpdateSecretRequest) GetDomainId() string

func (*UpdateSecretRequest) GetDomainType

func (x *UpdateSecretRequest) GetDomainType() authorization.DomainType

func (*UpdateSecretRequest) GetIdOrName

func (x *UpdateSecretRequest) GetIdOrName() string

func (*UpdateSecretRequest) GetSecret

func (x *UpdateSecretRequest) GetSecret() *Secret

func (*UpdateSecretRequest) ProtoMessage

func (*UpdateSecretRequest) ProtoMessage()

func (*UpdateSecretRequest) ProtoReflect

func (x *UpdateSecretRequest) ProtoReflect() protoreflect.Message

func (*UpdateSecretRequest) Reset

func (x *UpdateSecretRequest) Reset()

func (*UpdateSecretRequest) String

func (x *UpdateSecretRequest) String() string

type UpdateSecretResponse

type UpdateSecretResponse struct {
	Secret *Secret `protobuf:"bytes,1,opt,name=secret,proto3" json:"secret,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateSecretResponse) Descriptor deprecated

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

Deprecated: Use UpdateSecretResponse.ProtoReflect.Descriptor instead.

func (*UpdateSecretResponse) GetSecret

func (x *UpdateSecretResponse) GetSecret() *Secret

func (*UpdateSecretResponse) ProtoMessage

func (*UpdateSecretResponse) ProtoMessage()

func (*UpdateSecretResponse) ProtoReflect

func (x *UpdateSecretResponse) ProtoReflect() protoreflect.Message

func (*UpdateSecretResponse) Reset

func (x *UpdateSecretResponse) Reset()

func (*UpdateSecretResponse) String

func (x *UpdateSecretResponse) String() string

Jump to

Keyboard shortcuts

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