repositories

package
v0.3.2 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2021 License: Apache-2.0 Imports: 13 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 ReadOnlyClusterAccessRepository added in v0.3.0

type ReadOnlyClusterAccessRepository interface {
	// GetClustersAccessibleByUserId returns all clusters accessible by a user identified by user id
	GetClustersAccessibleByUserId(ctx context.Context, id uuid.UUID) ([]*projections.Cluster, error)
	// GetClustersAccessibleByTenantId returns all clusters accessible by a tenant identified by tenant id
	GetClustersAccessibleByTenantId(ctx context.Context, id uuid.UUID) ([]*projections.Cluster, error)
}

ReadOnlyClusterAccessRepository is a repository for reading accesses to a cluster.

func NewClusterAccessRepository added in v0.3.0

func NewClusterAccessRepository(tenantClusterBindingRepo ReadOnlyTenantClusterBindingRepository, clusterRepo ReadOnlyClusterRepository, userRoleBindingRepo ReadOnlyUserRoleBindingRepository) ReadOnlyClusterAccessRepository

NewClusterAccessRepository creates a repository for reading cluster access 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 ReadOnlyTenantClusterBindingRepository added in v0.3.0

type ReadOnlyTenantClusterBindingRepository interface {
	// GetAll searches for the a TenantClusterBinding projections.
	GetAll(ctx context.Context, showDeleted bool) ([]*projections.TenantClusterBinding, error)
	GetByTenantId(ctx context.Context, tenantId uuid.UUID) ([]*projections.TenantClusterBinding, error)
	GetByClusterId(ctx context.Context, tenantId uuid.UUID) ([]*projections.TenantClusterBinding, error)
	GetByTenantAndClusterId(ctx context.Context, tenantId, clusterId uuid.UUID) (*projections.TenantClusterBinding, error)
}

ReadOnlyTenantClusterBindingRepository is a repository for reading tenantclusterbinding 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)
	// GetCount returns the user count
	GetCount(context.Context, bool) (int, 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 TenantClusterBindingRepository added in v0.3.0

TenantClusterBindingRepository is a repository for reading and writing tenantclusterbinding projections.

func NewTenantClusterBindingRepository added in v0.3.0

func NewTenantClusterBindingRepository(repository es.Repository) TenantClusterBindingRepository

NewTenantClusterBindingRepository creates a repository for reading and writing tenantclusterbinding 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 WriteOnlyTenantClusterBindingRepository added in v0.3.0

type WriteOnlyTenantClusterBindingRepository interface {
}

WriteOnlyTenantClusterBindingRepository is a repository for writing tenantclusterbinding 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