tenants

package
v0.4.9 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTenantMismatch = errors.New("tenant flow - tenant mismatch")
)

Functions

This section is empty.

Types

type CreateTenant

type CreateTenant struct {
	Name      string
	Alias     string
	Website   string
	Providers []string
}

type Tenant

type Tenant client.Tenant

type TenantFlowController added in v0.2.3

type TenantFlowController interface {
	AppendRoutes(router *mux.Router) *mux.Router
}

func NewTenantFlowController added in v0.2.3

func NewTenantFlowController(logger logging.Logger, authFlow authflow.AuthenticationFlow, tenantService TenantService, providerRepository providers.Repository, credentials credentials.CredentialsService) TenantFlowController

type TenantProvider

type TenantProvider struct {
	TenantID   string
	ProviderID string
	Position   int
}

type TenantRepository

type TenantRepository interface {
	Add(create Tenant) (*Tenant, error)
	List() ([]Tenant, error)
	Get(tenantID string) (*Tenant, error)

	Update(update Tenant) (*Tenant, error)
}

Repository - Used for interacting identities on the data store

func NewTenantRepository

func NewTenantRepository(db *sql.DB) TenantRepository

type TenantService

type TenantService interface {
	GetByIdOrAlias(tenantIdOrAlias string) (*Tenant, error)
	List() ([]Tenant, error)
	Create(credentialID string, create CreateTenant) (*Tenant, error)

	Update(claims tmw.TumblerClaims, tenantID string, update UpdateTenant) (*Tenant, error)
}

func NewTenantService

func NewTenantService(time stime.TimeService, logger logging.Logger, repository TenantRepository) (TenantService, error)

type TenantsController

type TenantsController interface {
	AppendRoutes(router *mux.Router) *mux.Router
}

func NewTenantsController

func NewTenantsController(logger logging.Logger, service TenantService) TenantsController

type UpdateTenant added in v0.2.3

type UpdateTenant client.UpdateTenant

func (UpdateTenant) Validate added in v0.2.3

func (a UpdateTenant) Validate() error

Jump to

Keyboard shortcuts

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