core

package
v0.0.0-...-04ccc7c Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: AGPL-3.0 Imports: 4 Imported by: 35

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	PublicKey() *rsa.PublicKey
	Authenticate() (string, error)
	AccessKey() []byte
	VerifyAccessKey(hash []byte) bool
}

type Handler

type Handler interface {
	Setup()
	Serve() error
}

type InnerCommunicator

type InnerCommunicator interface {
	PostMessage(endpoint string, message interface{}, response interface{}, params ...*meta.RequestParams) error
	GetMessage(endpoint string, response interface{}, params ...*meta.RequestParams) error
}

type Serializer

type Serializer interface {
	Encode(data interface{}) ([]byte, error)
}

type Server

type Server interface {
	SetupEncryption(cert *meta.TLSCertificate)
	SetupAuth(pb *rsa.PublicKey, accessRoles meta.AccessConfig) // Must be configured before rest & gRPC sub servers!
	SetupREST(router chi.Router)                                // Setup REST sub server configuration
	SetupGRPC(fn func(srv *grpc.Server))                        // Setup gRPC sub server configuration
	SetupAMQP(handler Handler)                                  // Setup AMQP events handler sub server configuration
	SetupLogger()
	Start()
	Shutdown()
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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