iprotocol

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2021 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ConfigTopicServerCert = "certificate"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Certificate

type Certificate struct {
	CertName    string
	Description string
	IsDefault   bool

	CertFileName string
	CertFilePath string
	KeyFileName  string
	KeyFilePath  string
	ExpiredDate  string

	Products []*ibasic.Product
}

type CertificateFilter

type CertificateFilter struct {
	CertName  *string
	IsDefault *bool
}

type CertificateManager

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

func NewCertificateManager

func NewCertificateManager(txn itxn.TxnStorager, storager CertificateStorager,
	versionControlManager *iversion_control.VersionControlManager,
	extraFileStorager ibasic.ExtraFileStorager) *CertificateManager

func (*CertificateManager) CreateCertificate

func (pm *CertificateManager) CreateCertificate(ctx context.Context, param *CertificateParam) (err error)

func (*CertificateManager) DeleteCertificate

func (pm *CertificateManager) DeleteCertificate(ctx context.Context, certificate *Certificate) (err error)

func (*CertificateManager) ExportServerCert

func (pm *CertificateManager) ExportServerCert(ctx context.Context, lastVersion string) (*ServerCertConf, error)

func (*CertificateManager) FetchCertificates

func (pm *CertificateManager) FetchCertificates(ctx context.Context, param *CertificateFilter) (list []*Certificate, err error)

func (*CertificateManager) UpdateAsDefaultCertificate

func (pm *CertificateManager) UpdateAsDefaultCertificate(ctx context.Context, cert *Certificate) (err error)

type CertificateParam

type CertificateParam struct {
	CertName    *string
	Description *string
	IsDefault   *bool

	CertFileName    *string
	CertFilePath    *string
	CertFileContent *string
	KeyFileName     *string
	KeyFileContent  *string
	KeyFilePath     *string
	ExpiredDate     *string
}

type CertificateStorager

type CertificateStorager interface {
	FetchCertificates(context.Context, *CertificateFilter) ([]*Certificate, error)
	DeleteCertificate(context.Context, *Certificate) error
	CreateCertificate(context.Context, *CertificateParam) error
	UpdateCertificate(context.Context, *Certificate, *CertificateParam) error
}

type ServerCertConf

type ServerCertConf struct {
	server_cert_conf.BfeServerCertConf
}

func (*ServerCertConf) UpdateVersion

func (scc *ServerCertConf) UpdateVersion(version string) error

Jump to

Keyboard shortcuts

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