repositories

package
v0.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CertificateRepository

CertificateRepository is a repository for reading and writing certificate projections.

func NewCertificateRepository

func NewCertificateRepository(repository es.Repository) CertificateRepository

NewCertificateRepository creates a repository for reading and writing certificate projections.

type ClusterRepository

type ClusterRepository interface {
	es.Repository
	ReadOnlyClusterRepository
	WriteOnlyClusterRepository
}

ClusterRepository is a repository for reading and writing cluster projections.

func NewClusterRepository

func NewClusterRepository(repository es.Repository) ClusterRepository

NewClusterRepository creates a repository for reading and writing cluster projections.

type ReadOnlyCertificateRepository

type ReadOnlyCertificateRepository interface {
	// GetCertificate retrieves certificates by aggregate type and id
	GetCertificate(context.Context, *domApi.GetCertificateRequest) (*projections.Certificate, error)
}

ReadOnlyCertificateRepository is a repository for reading certificate projections.

type ReadOnlyClusterRepository

type ReadOnlyClusterRepository interface {
	// ById searches for the a tenant projection by it's id.
	ByClusterId(context.Context, string) (*projections.Cluster, error)
	// ByName searches for the a tenant projection by it's name
	ByClusterName(context.Context, string) (*projections.Cluster, error)
	// GetAll searches for all known clusters.
	GetAll(context.Context, bool) ([]*projections.Cluster, error)
	// GetBootstrapToken returns the bootstrap token for a cluster with the given UUID
	GetBootstrapToken(context.Context, string) (string, error)
}

ReadOnlyClusterRepository is a repository for reading cluster projections.

func NewRemoteClusterRepository

func NewRemoteClusterRepository(clusterClient api.ClusterClient) ReadOnlyClusterRepository

NewRemoteClusterRepository creates a repository for reading user projections.

type ReadOnlyTenantRepository

type ReadOnlyTenantRepository interface {
	// ById searches for the a tenant projection by it's id.
	ByTenantId(context.Context, string) (*projections.Tenant, error)
	// ByName searches for the a tenant projection by it's name
	ByName(context.Context, string) (*projections.Tenant, error)
	// GetAll searches for all tenant projections.
	GetAll(context.Context, bool) ([]*projections.Tenant, error)
}

ReadOnlyTenantRepository is a repository for reading tenant projections.

type ReadOnlyTenantUserRepository

type ReadOnlyTenantUserRepository interface {
	// GetTenantUsersById searches for users belonging to a tenant.
	GetTenantUsersById(context.Context, uuid.UUID) ([]*projections.TenantUser, error)
}

ReadOnlyTenantUserRepository is a repository for reading users of a tenant.

func NewTenantUserRepository

func NewTenantUserRepository(userRepo ReadOnlyUserRepository, userRoleBindingRepo ReadOnlyUserRoleBindingRepository) ReadOnlyTenantUserRepository

NewTenantUserRepository creates a repository for reading and writing tenantuser projections.

type ReadOnlyUserRepository

type ReadOnlyUserRepository interface {
	// ById searches for the a user projection by it's id.
	ByUserId(context.Context, uuid.UUID) (*projections.User, error)
	// ByEmail searches for the a user projection by it's email address.
	ByEmail(context.Context, string) (*projections.User, error)
	// GetAll searches for all user projection.
	GetAll(context.Context, bool) ([]*projections.User, error)
}

ReadOnlyUserRepository is a repository for reading user projections.

func NewRemoteUserRepository

func NewRemoteUserRepository(userService api.UserClient) ReadOnlyUserRepository

NewRemoteUserRepository creates a repository for reading user projections.

type ReadOnlyUserRoleBindingRepository

type ReadOnlyUserRoleBindingRepository interface {
	// ByUserId searches for all UserRoleBinding projection's by the a user id.
	ByUserId(context.Context, uuid.UUID) ([]*projections.UserRoleBinding, error)
	// ByUserIdAndScope searches for all UserRoleBinding projection's by the a user id and the scope.
	ByUserIdAndScope(context.Context, uuid.UUID, es.Scope) ([]*projections.UserRoleBinding, error)
	// ByScopeAndResource returns all UserRoleBinding projections matching the given scope and resource.
	ByScopeAndResource(context.Context, es.Scope, uuid.UUID) ([]*projections.UserRoleBinding, error)
}

ReadOnlyUserRepository is a repository for reading UserRoleBinding projections.

type TenantRepository

type TenantRepository interface {
	es.Repository
	ReadOnlyTenantRepository
	WriteOnlyTenantRepository
}

TenantRepository is a repository for reading and writing tenant projections.

func NewTenantRepository

func NewTenantRepository(repository es.Repository) TenantRepository

NewTenantRepository creates a repository for reading and writing tenant projections.

type UserRepository

type UserRepository interface {
	es.Repository
	ReadOnlyUserRepository
	WriteOnlyUserRepository
}

Repository is a repository for reading and writing user projections.

func NewUserRepository

func NewUserRepository(repository es.Repository, roleBindingRepo UserRoleBindingRepository) UserRepository

NewUserRepository creates a repository for reading and writing user projections.

type UserRoleBindingRepository

type UserRoleBindingRepository interface {
	es.Repository
	ReadOnlyUserRoleBindingRepository
}

Repository is a repository for reading and writing UserRoleBinding projections.

func NewUserRoleBindingRepository

func NewUserRoleBindingRepository(repository es.Repository) UserRoleBindingRepository

NewUserRepository creates a repository for reading and writing UserRoleBinding projections.

type WriteOnlyCertificateRepository

type WriteOnlyCertificateRepository interface {
}

WriteOnlyCertificateRepository is a repository for writing certificate projections.

type WriteOnlyClusterRepository

type WriteOnlyClusterRepository interface {
}

WriteOnlyClusterRepository is a repository for writing cluster projections.

type WriteOnlyTenantRepository

type WriteOnlyTenantRepository interface {
}

WriteOnlyTenantRepository is a repository for writing tenant projections.

type WriteOnlyUserRepository

type WriteOnlyUserRepository interface {
}

WriteOnlyUserRepository is a repository for writing user projections.

Jump to

Keyboard shortcuts

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