pki

package
v0.0.0-...-2b4f063 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CAConfigV1

type CAConfigV1 struct {
	Serial  int64           `json:"serial" default:"1"`
	Subject SubjectConfigV1 `json:"subject"`
}

структура для хранения конфигурации CA

type ConfigV1

type ConfigV1 struct {
	CA         CAConfigV1         `json:"ca"`
	Listener   ListenerConfigV1   `json:"listener"`
	Operator   OperatorConfigV1   `json:"operator"`
	Management ManagementConfigV1 `json:"management"`
}

конфигурация CA

func (*ConfigV1) Init

func (c *ConfigV1) Init(ctx context.Context, db *ent.Client, lIP, oIP, mIP net.IP) error

инициализация PKI (CA + сертификаты для GRPC серверов)

type ListenerConfigV1

type ListenerConfigV1 struct {
	Serial  int64           `json:"serial" default:"1"`
	Subject SubjectConfigV1 `json:"subject"`
}

структура для хранения конфигурации сертификата для сервера listener

type ManagementConfigV1

type ManagementConfigV1 struct {
	Serial  int64           `json:"serial" default:"1"`
	Subject SubjectConfigV1 `json:"subject"`
}

структура для хранения конфигурации сертификата для сервера management

type OperatorConfigV1

type OperatorConfigV1 struct {
	Serial  int64           `json:"serial" default:"1"`
	Subject SubjectConfigV1 `json:"subject"`
}

структура для хранения конфигурации сертификата для сервера operator

type SubjectConfigV1

type SubjectConfigV1 struct {
	OrganizationalUnit string `json:"ou" default:"c2micro Root CA"`
	Organization       string `json:"o" default:"c2micro"`
	CommonName         string `json:"cn" default:"c2micro"`
	Country            string `json:"c" default:"RU"`
	Province           string `json:"p" default:""`
	Locality           string `json:"l" default:"Moscow"`
}

Jump to

Keyboard shortcuts

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