grpcc

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2021 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetAccountContext added in v0.1.3

func SetAccountContext(ctx context.Context, accountID string) context.Context

func SetAsertoAPIKey

func SetAsertoAPIKey(ctx context.Context, key string) context.Context

func SetTenantContext

func SetTenantContext(ctx context.Context, tenantID string) context.Context

Types

type APIKeyAuth

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

APIKeyAuth API key based authentication

func NewAPIKeyAuth

func NewAPIKeyAuth(key string) *APIKeyAuth

func (*APIKeyAuth) GetRequestMetadata

func (k *APIKeyAuth) GetRequestMetadata(ctx context.Context, in ...string) (map[string]string, error)

func (*APIKeyAuth) RequireTransportSecurity

func (k *APIKeyAuth) RequireTransportSecurity() bool

type Client

type Client struct {
	Conn *grpc.ClientConn // TODO: change into grpc.ClientConnInterface type.
}

func NewClient

func NewClient(ctx context.Context, dialAddr string, creds credentials.PerRPCCredentials) (*Client, error)

type Services

type Services struct {
	Environment       string
	TenantService     string
	AuthorizerService string
	RegistryService   string
	TasksService      string
}

func Environment

func Environment(env string) (*Services, error)

type TokenAuth

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

TokenAuth bearer token based authentication.

func NewTokenAuth

func NewTokenAuth(token string) *TokenAuth

func (TokenAuth) GetRequestMetadata

func (t TokenAuth) GetRequestMetadata(ctx context.Context, in ...string) (map[string]string, error)

func (TokenAuth) RequireTransportSecurity

func (TokenAuth) RequireTransportSecurity() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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