Documentation ¶
Overview ¶
Package api bootstraps and configures the API stubs connecting the server with the concrete, business logic implementations.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrCannotDialServer = errors.New("cannot connect to grpc server") ErrMissingCertificates = errors.New("cannot get system certificates") )
Err* are common error codes
View Source
var ProtoPackages = []string{
"x40.dev.url",
"x40.dev.auth",
}
ProtoPackages is a list of all protobuf packages this API cares about.
Functions ¶
func NewGRPCMux ¶
NewGRPCMux generates a valid GRPC server with all GRPC routes configured.
func X40Permissions ¶
X40Permissions returns a paired list of method + scope definitions.
func X40PermissionsList ¶
func X40PermissionsList() []string
X40PermissionsList returns a list of all permissions, but no method association.
Types ¶
type Client ¶
type Client interface { gendev.ManageURLsClient }
Client is the common interface for the gRPC client
func NewGRPCClient ¶
func NewGRPCClient(addr string, opts ...grpc.DialOption) (Client, error)
NewGRPCClient generates a client able to talk gRPC to the API
Directories ¶
Path | Synopsis |
---|---|
Package auth provides authentication implementation(s) that can be used to limit access to the (gRPC) server.
|
Package auth provides authentication implementation(s) that can be used to limit access to the (gRPC) server. |
jwts
Package jwts provides various different JWT tokens.
|
Package jwts provides various different JWT tokens. |
tokens
Package tokens provides an implementation to fetch and manage OAuth2 tokens.
|
Package tokens provides an implementation to fetch and manage OAuth2 tokens. |
tokens/seeds
Package seeds provides a way to "seed" a token source; especially one that relies on caching.
|
Package seeds provides a way to "seed" a token source; especially one that relies on caching. |
tokens/storage
Package storage provides storage for the cachable token interface.
|
Package storage provides storage for the cachable token interface. |
Package dev implements a GRPC server that reads and writes URLs to storage.
|
Package dev implements a GRPC server that reads and writes URLs to storage. |
Package di provides utilities to help resolve dependencies into valid objects
|
Package di provides utilities to help resolve dependencies into valid objects |
Click to show internal directories.
Click to hide internal directories.