http

package
v0.0.0-...-9a2eb6e Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2022 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Logger

type Logger struct {
	Dump      bool
	SkipPaths []string
}

func NewLogger

func NewLogger() *Logger

func (*Logger) HandlerFunc

func (l *Logger) HandlerFunc() gin.HandlerFunc

type PrivateKey

type PrivateKey struct {
	*rsa.PrivateKey
	PublicKeyPEM string
}

func (*PrivateKey) Decrypt

func (k *PrivateKey) Decrypt(ciphertext []byte) ([]byte, error)

func (*PrivateKey) DecryptBase64

func (k *PrivateKey) DecryptBase64(s string) ([]byte, error)

func (*PrivateKey) Sign

func (k *PrivateKey) Sign(msg []byte) ([]byte, error)

func (*PrivateKey) SignBase64

func (k *PrivateKey) SignBase64(msg []byte) (string, error)

type PublicKey

type PublicKey struct {
	*rsa.PublicKey
}

func (*PublicKey) Encrypt

func (k *PublicKey) Encrypt(msg []byte) ([]byte, error)

func (*PublicKey) EncryptBase64

func (k *PublicKey) EncryptBase64(msg []byte) (string, error)

type Secret

type Secret struct {
	Shared *ec2b.Ec2b
	Server *PrivateKey
	Client map[string]*PublicKey
}

func NewSecret

func NewSecret() *Secret

type Server

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

func NewServer

func NewServer(cfg *config.Config) *Server

func (*Server) LoadSecret

func (s *Server) LoadSecret() error

func (*Server) Shutdown

func (s *Server) Shutdown(ctx context.Context) error

func (*Server) Start

func (s *Server) Start() (err error)

Jump to

Keyboard shortcuts

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