Documentation
¶
Index ¶
- func Provide(i *do.Injector)
- type CAStore
- type Principal
- type PrincipalStore
- func (s *PrincipalStore) DeleteByKey(certificateID string) storage.DeleteOp
- func (s *PrincipalStore) ExistsByKey(certificateID string) storage.ExistsOp
- func (s *PrincipalStore) GetByKey(certificateID string) storage.GetOp[*StoredPrincipal]
- func (s *PrincipalStore) Key(certificateID string) string
- func (s *PrincipalStore) Prefix() string
- func (s *PrincipalStore) Put(item *StoredPrincipal) storage.PutOp[*StoredPrincipal]
- type RootCA
- type Service
- func (s *Service) CACert() []byte
- func (s *Service) EtcdServer(ctx context.Context, hostID, hostname string, dnsNames, ips []string) (*Principal, error)
- func (s *Service) HostEtcdUser(ctx context.Context, hostID string) (*Principal, error)
- func (s *Service) InstanceEtcdUser(ctx context.Context, instanceID string) (*Principal, error)
- func (s *Service) JoinToken() string
- func (s *Service) PostgresServer(ctx context.Context, instanceID, hostname string, dnsNames, ips []string) (*Principal, error)
- func (s *Service) PostgresUser(ctx context.Context, instanceID, username string) (*Principal, error)
- func (s *Service) PostgresUserTLS(ctx context.Context, instanceID, hostname, username string) (*tls.Config, error)
- func (s *Service) RemoveEtcdServer(ctx context.Context, hostID string) error
- func (s *Service) RemoveHostEtcdUser(ctx context.Context, hostID string) error
- func (s *Service) RemoveInstanceEtcdUser(ctx context.Context, instanceID string) error
- func (s *Service) RemovePostgresServer(ctx context.Context, instanceID string) error
- func (s *Service) RemovePostgresUser(ctx context.Context, instanceID, username string) error
- func (s *Service) Start(ctx context.Context) error
- func (s *Service) Verify(certPEM []byte) error
- type Store
- type StoredCA
- type StoredPrincipal
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Principal ¶
func StoredToPrincipal ¶
func StoredToPrincipal(p *StoredPrincipal) (*Principal, error)
type PrincipalStore ¶
type PrincipalStore struct {
// contains filtered or unexported fields
}
func NewPrincipalStore ¶
func NewPrincipalStore(client *clientv3.Client, root string) *PrincipalStore
func (*PrincipalStore) DeleteByKey ¶
func (s *PrincipalStore) DeleteByKey(certificateID string) storage.DeleteOp
func (*PrincipalStore) ExistsByKey ¶
func (s *PrincipalStore) ExistsByKey(certificateID string) storage.ExistsOp
func (*PrincipalStore) GetByKey ¶
func (s *PrincipalStore) GetByKey(certificateID string) storage.GetOp[*StoredPrincipal]
func (*PrincipalStore) Key ¶
func (s *PrincipalStore) Key(certificateID string) string
func (*PrincipalStore) Prefix ¶
func (s *PrincipalStore) Prefix() string
func (*PrincipalStore) Put ¶
func (s *PrincipalStore) Put(item *StoredPrincipal) storage.PutOp[*StoredPrincipal]
type RootCA ¶
type RootCA struct {
Cert *x509.Certificate
Key crypto.Signer
JoinToken string
}
func CreateRootCA ¶
func StoredToRootCA ¶
func (*RootCA) CreateCertificate ¶
func (*RootCA) CreateSignedCertFromCSR ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func (*Service) EtcdServer ¶
func (*Service) HostEtcdUser ¶
func (*Service) InstanceEtcdUser ¶
func (*Service) PostgresServer ¶
func (*Service) PostgresUser ¶
func (*Service) PostgresUserTLS ¶
func (*Service) RemoveEtcdServer ¶
func (*Service) RemoveHostEtcdUser ¶
func (*Service) RemoveInstanceEtcdUser ¶
func (*Service) RemovePostgresServer ¶
func (*Service) RemovePostgresUser ¶
type Store ¶
type Store struct {
CA *CAStore
Principal *PrincipalStore
// contains filtered or unexported fields
}
type StoredCA ¶
type StoredCA struct {
storage.StoredValue
KeyPEM string `json:"key_pem"`
CertPEM string `json:"cert_pem"`
JoinToken string `json:"join_token"`
}
func RootCAToStored ¶
type StoredPrincipal ¶
type StoredPrincipal struct {
storage.StoredValue
ID string `json:"id"`
KeyPEM string `json:"key_pem"`
CertPEM string `json:"cert_pem"`
}
func PrincipalToStored ¶
func PrincipalToStored(p *Principal) *StoredPrincipal
Click to show internal directories.
Click to hide internal directories.