api

package
v0.0.0-...-ec252d0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

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

func NewGRPCMux(storer storage.Storer, opts ...grpc.ServerOption) *grpc.Server

NewGRPCMux generates a valid GRPC server with all GRPC routes configured.

func ReflectionPermissions

func ReflectionPermissions() map[string]string

ReflectionPermissions are permissions from the reflection API.

See

func X40Permissions

func X40Permissions() map[string]string

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

Jump to

Keyboard shortcuts

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