memory

package
v0.13.0-rc.1 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 13 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() *CA

func (*CA) GetRevokedCertificate

func (c *CA) GetRevokedCertificate(_ context.Context, serial *big.Int) ([]*database.RevokedCertificate, error)

func (*CA) GetSignedCertificate

func (c *CA) GetSignedCertificate(_ context.Context, serial *big.Int) ([]*database.SignedCertificate, error)

func (*CA) NewSerialNumber

func (c *CA) NewSerialNumber(_ context.Context) (*big.Int, error)

func (*CA) SetRevokedCertificate

func (c *CA) SetRevokedCertificate(_ context.Context, certificate *database.RevokedCertificate) error

func (*CA) SetSignedCertificate

func (c *CA) SetSignedCertificate(_ context.Context, certificate *database.SignedCertificate) error

func (*CA) WatchRevokeCertificate

func (c *CA) WatchRevokeCertificate() chan struct{}

type ClusterDatabase

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

func NewClusterDatabase

func NewClusterDatabase() *ClusterDatabase

func (*ClusterDatabase) Alive

func (d *ClusterDatabase) Alive() bool

func (*ClusterDatabase) Id

func (d *ClusterDatabase) Id() string

func (*ClusterDatabase) Join

func (d *ClusterDatabase) Join(_ context.Context) error

func (*ClusterDatabase) Leave

func (d *ClusterDatabase) Leave(_ context.Context) error

func (*ClusterDatabase) MemberList

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

type RelayLocator

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

func NewRelayLocator

func NewRelayLocator() *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() *TokenDatabase

func (*TokenDatabase) AllCodes

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

func (*TokenDatabase) AllTokens

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

func (*TokenDatabase) DeleteCode

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

func (*TokenDatabase) DeleteToken

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

func (*TokenDatabase) FindToken

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

func (*TokenDatabase) IssueToken

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

func (*TokenDatabase) NewCode

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

func (*TokenDatabase) SetUser

func (t *TokenDatabase) SetUser(userId string) (*database.Token, error)

type UserDatabase

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

func NewUserDatabase

func NewUserDatabase(systemUsers ...*database.User) *UserDatabase

func (*UserDatabase) Delete

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

func (*UserDatabase) DeleteState

func (u *UserDatabase) DeleteState(_ 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) GetIdentityByLoginName added in v0.10.0

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

func (*UserDatabase) GetState

func (u *UserDatabase) GetState(_ 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(_ context.Context, token *database.AccessToken) error

func (*UserDatabase) SetState

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

Jump to

Keyboard shortcuts

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