auth

package
v1.1.10 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: BSD-3-Clause Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthServiceSecretManager added in v1.1.10

type AuthServiceSecretManager interface {
	GetPublicKeys(ctx context.Context) ([]DistributedKey, error)
	StoreEncrypted(ctx context.Context, secretID string, encryptedKey []byte, encryptedData []byte, nonce []byte, distributedKeyID string) error
	GetEncrypted(ctx context.Context, secretID string) (*EncryptedSecretInfo, error)
	GetDecryptionShares(ctx context.Context, encryptedSecret []byte, distributedKeyID string) ([][]byte, error)
	Delete(ctx context.Context, secretID string) error
	Exists(ctx context.Context, secretID string) (bool, error)
	List(ctx context.Context) ([]string, error)
	CheckAndTriggerDKG(ctx context.Context, trigger TriggerReason) error
	AttachStreams(authService peerService.CommandService)
	Close() error
}

type BitbucketHook

type BitbucketHook struct {
	Id string
}

type Client

type Client interface {
	InjectStaticCertificate(domain string, data []byte) error
	GetCertificate(domain string) (*tls.Certificate, error)
	GetStaticCertificate(domain string) (*tls.Certificate, error)
	GetRawCertificate(domain string) ([]byte, error)
	GetRawStaticCertificate(domain string) ([]byte, error)
	RegisterDomain(fqdn, projectID string) (*DomainRegistration, error)
	Hooks() Hooks
	Projects() Projects
	Repositories() Repositories
	Secrets() Secrets
	Stats() Stats // TODO: rename State
	Peers(...peerCore.ID) Client
	Close()
}

type DistributedKey added in v1.1.10

type DistributedKey interface {
	KeyID() string
	PublicKey() []byte
	Members() []peer.ID
	Threshold() int
	MemberCount() int
	CreatedAt() time.Time
}

type DomainRegistration added in v1.1.9

type DomainRegistration struct {
	Token string `json:"token"`
	Entry string `json:"entry"`
	Type  string `json:"type"`
}

type EncryptedSecretInfo added in v1.1.10

type EncryptedSecretInfo struct {
	SecretID         string
	EncryptedData    []byte
	Nonce            []byte
	DistributedKeyID string
	Members          []peer.ID
	Threshold        int
	PublicKey        []byte
}

type GithubHook

type GithubHook struct {
	Id       string
	GithubId int
	Secret   string
}

func (*GithubHook) Bitbucket

func (h *GithubHook) Bitbucket() (*BitbucketHook, error)

func (*GithubHook) Github

func (h *GithubHook) Github() (*GithubHook, error)

type GithubRepositories

type GithubRepositories interface {
	New(obj map[string]interface{}) (GithubRepository, error)
	Get(id int) (GithubRepository, error)
	List() ([]string, error)
	Register(repoID string) (string, error)
}

type GithubRepository

type GithubRepository interface {
	Repository
	PrivateKey() string
	Project() string
}

type Hook

type Hook interface {
	Github() (*GithubHook, error)
	Bitbucket() (*BitbucketHook, error)
}

type Hooks

type Hooks interface {
	Get(hook_id string) (Hook, error)
	New(obj map[string]interface{}) (Hook, error)
	List() ([]string, error)
}

type Project

type Project struct {
	Client
	Id       string
	Name     string
	Provider string
	Git      struct {
		Config Repository
		Code   Repository
	}
}

type Projects

type Projects interface {
	New(obj map[string]interface{}) *Project
	Get(project_id string) *Project
	List() ([]string, error)
	Create(name, configRepoID, codeRepoID string) error
}

type PublicKeyOption added in v1.1.10

type PublicKeyOption func(*PublicKeyOptions)

func Limit added in v1.1.10

func Limit(limit int) PublicKeyOption

type PublicKeyOptions added in v1.1.10

type PublicKeyOptions struct {
	Limit int
}

type Repositories

type Repositories interface {
	Github() GithubRepositories
}

type Repository

type Repository interface {
	PrivateKey() string
	Id() int
}

type Secrets added in v1.1.10

type Secrets interface {
	Store(ctx context.Context, secretID string, plaintext []byte) error
	Retrieve(ctx context.Context, secretID string) ([]byte, error)
	Delete(ctx context.Context, secretID string) error
	Exists(ctx context.Context, secretID string) (bool, error)
	List(ctx context.Context) ([]string, error)
	PublicKeys(ctx context.Context, opts ...PublicKeyOption) ([]DistributedKey, error)
}

type Service

type Service interface {
	services.DBService
	services.GitHubAuth
}

type ServiceStreamClient added in v1.1.10

type ServiceStreamClient interface {
	New(cmd string, opts ...client.Option[client.Request]) *client.Request
}

type Stats

type Stats interface {
	Database() (kvdb.Stats, error)
}

type StreamClient added in v1.1.10

type StreamClient interface {
	New(cmd string, opts ...client.Option[client.Request]) *client.Request
}

type TriggerReason added in v1.1.10

type TriggerReason int
const (
	TriggerFirstSecret TriggerReason = iota
	TriggerFirstNode
	TriggerInterval
)

Jump to

Keyboard shortcuts

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