mysql

package
v0.11.1-rc.1 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CA

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

func NewCA

func NewCA(dao *dao.Repository) *CA

func (*CA) GetRevokedCertificate

func (ca *CA) GetRevokedCertificate(ctx context.Context, serialNumber *big.Int) ([]*database.RevokedCertificate, error)

func (*CA) GetSignedCertificate

func (ca *CA) GetSignedCertificate(ctx context.Context, serialNumber *big.Int) ([]*database.SignedCertificate, error)

func (*CA) NewSerialNumber

func (ca *CA) NewSerialNumber(ctx context.Context) (*big.Int, error)

func (*CA) SetRevokedCertificate

func (ca *CA) SetRevokedCertificate(ctx context.Context, certificate *database.RevokedCertificate) error

func (*CA) SetSignedCertificate

func (ca *CA) SetSignedCertificate(ctx context.Context, certificate *database.SignedCertificate) error

func (*CA) WatchRevokeCertificate

func (ca *CA) WatchRevokeCertificate() chan *database.RevokedCertificate

type ClusterDatabase

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

func NewCluster

func NewCluster(dao *dao.Repository) (*ClusterDatabase, error)

func (*ClusterDatabase) Alive

func (c *ClusterDatabase) Alive() bool

func (*ClusterDatabase) Id

func (c *ClusterDatabase) Id() string

func (*ClusterDatabase) Join

func (c *ClusterDatabase) Join(ctx context.Context) error

func (*ClusterDatabase) Leave

func (c *ClusterDatabase) Leave(ctx context.Context) error

func (*ClusterDatabase) MemberList

func (c *ClusterDatabase) MemberList(ctx context.Context) ([]*database.Member, error)

type RelayLocator

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

func NewRelayLocator

func NewRelayLocator(dao *dao.Repository) *RelayLocator

func (*RelayLocator) Delete

func (r *RelayLocator) Delete(ctx context.Context, name, addr string) error

func (*RelayLocator) Get

func (r *RelayLocator) Get(name string) (*database.Relay, bool)

func (*RelayLocator) GetListenedAddrs

func (r *RelayLocator) GetListenedAddrs() []string

func (*RelayLocator) Gone

func (r *RelayLocator) Gone() chan *database.Relay

func (*RelayLocator) ListAllConnectedAgents

func (r *RelayLocator) ListAllConnectedAgents() []*database.Relay

func (*RelayLocator) Set

func (r *RelayLocator) Set(ctx context.Context, relay *database.Relay) error

func (*RelayLocator) Update

func (r *RelayLocator) Update(ctx context.Context, relay *database.Relay) error

type TokenDatabase

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

func NewTokenDatabase

func NewTokenDatabase(dao *dao.Repository) *TokenDatabase

func (*TokenDatabase) AllCodes

func (t *TokenDatabase) AllCodes(ctx context.Context) ([]*database.Code, error)

func (*TokenDatabase) AllTokens

func (t *TokenDatabase) AllTokens(ctx context.Context) ([]*database.Token, error)

func (*TokenDatabase) DeleteCode

func (t *TokenDatabase) DeleteCode(ctx context.Context, code string) error

func (*TokenDatabase) DeleteToken

func (t *TokenDatabase) DeleteToken(ctx context.Context, token string) error

func (*TokenDatabase) FindToken

func (t *TokenDatabase) FindToken(ctx context.Context, token string) (*database.Token, error)

func (*TokenDatabase) IssueToken

func (t *TokenDatabase) IssueToken(ctx context.Context, code, codeVerifier string) (*database.Token, error)

func (*TokenDatabase) NewCode

func (t *TokenDatabase) NewCode(ctx context.Context, userId, challenge, challengeMethod string) (*database.Code, error)

type UserDatabase

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

func NewUserDatabase

func NewUserDatabase(dao *dao.Repository, systemUsers ...*database.User) *UserDatabase

func (*UserDatabase) Delete

func (u *UserDatabase) Delete(ctx context.Context, id string) error

func (*UserDatabase) DeleteState

func (u *UserDatabase) DeleteState(ctx context.Context, state string) error

func (*UserDatabase) Get

func (*UserDatabase) GetAccessToken

func (u *UserDatabase) GetAccessToken(value string) (*database.AccessToken, error)

func (*UserDatabase) GetAccessTokens

func (u *UserDatabase) GetAccessTokens(id string) ([]*database.AccessToken, error)

func (*UserDatabase) GetAll

func (u *UserDatabase) GetAll() ([]*database.User, error)

func (*UserDatabase) GetAllServiceAccount

func (u *UserDatabase) GetAllServiceAccount() ([]*database.User, error)

func (*UserDatabase) GetGPGKey added in v0.9.0

func (u *UserDatabase) GetGPGKey(ctx context.Context, id string) (*database.GPGKey, error)

func (*UserDatabase) GetIdentityByLoginName added in v0.10.0

func (u *UserDatabase) GetIdentityByLoginName(ctx context.Context, loginName string) (string, error)

func (*UserDatabase) GetSSHKeys

func (u *UserDatabase) GetSSHKeys(ctx context.Context, id string) (*database.SSHKeys, error)

func (*UserDatabase) GetState

func (u *UserDatabase) GetState(ctx context.Context, state string) (string, error)

func (*UserDatabase) Set

func (u *UserDatabase) Set(ctx context.Context, user *database.User) error

func (*UserDatabase) SetAccessToken

func (u *UserDatabase) SetAccessToken(ctx context.Context, token *database.AccessToken) error

func (*UserDatabase) SetGPGKey added in v0.9.0

func (u *UserDatabase) SetGPGKey(ctx context.Context, key *database.GPGKey) error

func (*UserDatabase) SetSSHKeys

func (u *UserDatabase) SetSSHKeys(ctx context.Context, keys *database.SSHKeys) error

func (*UserDatabase) SetState

func (u *UserDatabase) SetState(ctx context.Context, unique string) (string, error)

Directories

Path Synopsis
Generated by protoc-ddl.
Generated by protoc-ddl.
Generated by protoc-ddl.
Generated by protoc-ddl.

Jump to

Keyboard shortcuts

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