sca

package module
v0.0.0-...-0d8e2ed Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2021 License: Apache-2.0 Imports: 22 Imported by: 1

README

services-ca

Services CA - Generates TLS and sign/verify certificate for authenticated service

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ContextWithCert

func ContextWithCert(parent context.Context, cert *x509.Certificate) context.Context

func ContextWithKey

func ContextWithKey(parent context.Context, key crypto.PrivateKey) context.Context

func ContextWithManager

func ContextWithManager(parent context.Context, manager CredentialsManager) context.Context

Types

type CredentialsManager

type CredentialsManager interface {
	GetSecret(string) (string, error)
}

type CredentialsManagerFunc

type CredentialsManagerFunc func(string) (string, error)

func (CredentialsManagerFunc) GetSecret

func (f CredentialsManagerFunc) GetSecret(name string) (string, error)

type Server

type Server struct {
	Errs chan error
	// contains filtered or unexported fields
}

func NewServer

func NewServer(cfg *ServerConfig) *Server

func (*Server) Certificate

func (s *Server) Certificate() *x509.Certificate

func (*Server) PrivateKey

func (s *Server) PrivateKey() crypto.PrivateKey

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

type ServerConfig

type ServerConfig struct {
	Manager    CredentialsManager
	Port       int
	Domain     string
	BindIP     string
	WorkingDir string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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