Documentation
¶
Overview ¶
Package bridge serves Atmos API services to native plugins within live invocations.
Index ¶
- Constants
- func ClearPrivateSession(storage keyring.Keyring, namespace string) error
- type Invocation
- type SecretReader
- type Server
- func (s *Server) Begin(id string, invocation Invocation) (func(), error)
- func (s *Server) Delete(ctx context.Context, request *apiv1.DeleteRequest) (*emptypb.Empty, error)
- func (s *Server) Do(ctx context.Context, request *apiv1.HTTPRequest) (*apiv1.HTTPResponse, error)
- func (s *Server) Get(ctx context.Context, request *apiv1.GetRequest) (*apiv1.GetResponse, error)
- func (s *Server) Listen(request *apiv1.ListenRequest, ...) error
- func (s *Server) Open(ctx context.Context, request *apiv1.OpenRequest) (*emptypb.Empty, error)
- func (s *Server) Put(ctx context.Context, request *apiv1.PutRequest) (*emptypb.Empty, error)
- func (s *Server) Read(ctx context.Context, request *apiv1.SecretRequest) (*apiv1.SecretResponse, error)
- func (s *Server) Register(server *grpc.Server)
Constants ¶
const InvocationMetadata = "atmos-invocation-id"
InvocationMetadata is set by Plugin SDK calls back into the Atmos API.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Invocation ¶
type Invocation struct {
Context context.Context
Browser api.Browser
HTTP api.HTTP
Secrets SecretReader
Keyring keyring.Keyring
Namespace string
Interactive bool
}
Invocation scopes API services to a single active call. Namespace includes the package, configured provider, realm, and configuration fingerprint.
type SecretReader ¶
SecretReader grants logical names, never arbitrary store paths, to one provider.
type Server ¶
type Server struct {
apiv1.UnimplementedHTTPServer
apiv1.UnimplementedBrowserServer
apiv1.UnimplementedCredentialsServer
apiv1.UnimplementedSecretsServer
// contains filtered or unexported fields
}
Server rejects API requests after their invocation has completed.
func (*Server) Begin ¶
func (s *Server) Begin(id string, invocation Invocation) (func(), error)
Begin grants API access until the returned cleanup function is called.
func (*Server) Do ¶
func (s *Server) Do(ctx context.Context, request *apiv1.HTTPRequest) (*apiv1.HTTPResponse, error)
Do executes one exchange through the invocation's shared HTTP transport.
func (*Server) Get ¶
func (s *Server) Get(ctx context.Context, request *apiv1.GetRequest) (*apiv1.GetResponse, error)
Get reads opaque private session state without applying access-token expiry.
func (*Server) Listen ¶
func (s *Server) Listen(request *apiv1.ListenRequest, stream grpc.ServerStreamingServer[apiv1.CallbackEvent]) error
Listen sends readiness before waiting for exactly one matching callback.
func (*Server) Put ¶
Put persists a replacement session before the plugin publishes new credentials.
func (*Server) Read ¶
func (s *Server) Read(ctx context.Context, request *apiv1.SecretRequest) (*apiv1.SecretResponse, error)
Read reads an explicitly granted secret without exposing backend diagnostics.