cert

package
v0.0.0-...-7be9f71 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2024 License: GPL-3.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName = "cert"

Variables

This section is empty.

Functions

func NewService

func NewService(ctx gousu.IContext) gousu.IService

Types

type IService

type IService interface {
	GenerateCACert() (*PEMCert, error)
	GenerateServerCert(hostname string, ca *PEMCert) (*PEMCert, error)
	GenerateClientCert(agentUID string, clientsPEM *PEMCert) (*PEMCert, error)
}

type PEMCert

type PEMCert struct {
	Crt        []byte
	Key        []byte
	CreatedAt  null.Time
	ValidUntil null.Time
}

type Service

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

func (*Service) GenerateCACert

func (s *Service) GenerateCACert() (*PEMCert, error)

func (*Service) GenerateClientCert

func (s *Service) GenerateClientCert(agentUID string, clientsPEM *PEMCert) (*PEMCert, error)

func (*Service) GenerateServerCert

func (s *Service) GenerateServerCert(hostname string, caPEM *PEMCert) (*PEMCert, error)

func (*Service) Health

func (s *Service) Health() error

func (*Service) Name

func (s *Service) Name() string

func (*Service) Start

func (s *Service) Start() error

func (*Service) Stop

func (s *Service) Stop() error

Jump to

Keyboard shortcuts

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