Documentation ¶
Index ¶
- type DBService
- func (s DBService) Exists(tenantID uuid.UUID) bool
- func (s DBService) GetNamespaces(tenantID uuid.UUID) ([]*Namespace, error)
- func (s DBService) GetTenant(tenantID uuid.UUID) (*Tenant, error)
- func (s DBService) UpdateNamespace(namespace *Namespace) error
- func (s DBService) UpdateTenant(tenant *Tenant) error
- type Namespace
- type NamespaceType
- type NilService
- func (s NilService) Exists(tenantID uuid.UUID) bool
- func (s NilService) GetNamespaces(tenantID uuid.UUID) ([]*Namespace, error)
- func (s NilService) GetTenant(tenantID uuid.UUID) (*Tenant, error)
- func (s NilService) UpdateNamespace(namespace *Namespace) error
- func (s NilService) UpdateTenant(tenant *Tenant) error
- type Service
- type Tenant
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DBService ¶
type DBService struct {
// contains filtered or unexported fields
}
func (DBService) GetNamespaces ¶
func (DBService) UpdateNamespace ¶
func (DBService) UpdateTenant ¶
type Namespace ¶
type Namespace struct { ID uuid.UUID `sql:"type:uuid default uuid_generate_v4()" gorm:"primary_key"` TenantID uuid.UUID `sql:"type:uuid"` CreatedAt time.Time UpdatedAt time.Time DeletedAt *time.Time Name string MasterURL string Type NamespaceType Version string State string }
Namespace represent a single namespace owned by an Tenant
type NamespaceType ¶
type NamespaceType string
NamespaceType describes which type of namespace this is
const ( TypeChe NamespaceType = "che" TypeJenkins NamespaceType = "jenkins" TypeTest NamespaceType = "test" TypeStage NamespaceType = "stage" TypeRun NamespaceType = "run" TypeUser NamespaceType = "user" )
Represents the namespace type
func GetNamespaceType ¶
func GetNamespaceType(name string) NamespaceType
GetNamespaceType attempts to extract the namespace type based on namespace name
func (*NamespaceType) Scan ¶
func (ns *NamespaceType) Scan(value interface{}) error
Scan - Implement the database/sql scanner interface
type NilService ¶
type NilService struct { }
func (NilService) GetNamespaces ¶
func (s NilService) GetNamespaces(tenantID uuid.UUID) ([]*Namespace, error)
func (NilService) UpdateNamespace ¶
func (s NilService) UpdateNamespace(namespace *Namespace) error
func (NilService) UpdateTenant ¶
func (s NilService) UpdateTenant(tenant *Tenant) error
type Service ¶
type Service interface { Exists(tenantID uuid.UUID) bool GetTenant(tenantID uuid.UUID) (*Tenant, error) GetNamespaces(tenantID uuid.UUID) ([]*Namespace, error) UpdateTenant(tenant *Tenant) error UpdateNamespace(namespace *Namespace) error }
func NewDBService ¶
Click to show internal directories.
Click to hide internal directories.