service

package
v0.0.0-...-33a7722 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TenantDataService

type TenantDataService struct {
	UUIDGeneratorService system.UUIDGeneratorService
	ClusterConfig        *gocql.ClusterConfig
}

TenantDataService provides access to add new tenant and update/retrieve/remove an existing tenant.

func (TenantDataService) CreateApplication

func (tenantDataService TenantDataService) CreateApplication(tenantID system.UUID, application contract.Application) (system.UUID, error)

CreateApplication creates new application for the provided tenant. tenantID: Mandatory. The unique identifier of the tenant to create the application for. application: Mandatory. The reference to the new application to create for the provided tenant Returns either the unique identifier of the new application or error if something goes wrong.

func (TenantDataService) CreateTenant

func (tenantDataService TenantDataService) CreateTenant(tenant contract.Tenant) (system.UUID, error)

CreateTenant creates a new tenant. tenant: Mandatory. The reference to the new tenant information Returns either the unique identifier of the new tenant or error if something goes wrong.

func (TenantDataService) DeleteApplication

func (tenantDataService TenantDataService) DeleteApplication(tenantID system.UUID, applicationID system.UUID) error

DeleteApplication deletes an existing tenant application information. tenantID: Mandatory: The unique identifier of the existing tenant to remove. applicationID: Mandatory: The unique identifier of the existing application. Returns error if something goes wrong.

func (TenantDataService) DeleteTenant

func (tenantDataService TenantDataService) DeleteTenant(tenantID system.UUID) error

DeleteTenant deletes an existing tenant information. tenantID: Mandatory: The unique identifier of the existing tenant to remove. Returns error if something goes wrong.

func (TenantDataService) ReadAllApplications

func (tenantDataService TenantDataService) ReadAllApplications(tenantID system.UUID) (map[system.UUID]contract.Application, error)

ReadAllApplications retrieves the list of created applications for the provided tenant. tenantID: Mandatory: The unique identifier of the existing tenant. Returns either the list of created applications for the provided tenant or error if something goes wrong.

func (TenantDataService) ReadApplication

func (tenantDataService TenantDataService) ReadApplication(tenantID system.UUID, applicationID system.UUID) (contract.Application, error)

ReadApplication retrieves an existing tenant information. tenantID: Mandatory: The unique identifier of the existing tenant. applicationID: Mandatory: The unique identifier of the existing application. Returns either the tenant application information or error if something goes wrong.

func (TenantDataService) ReadTenant

func (tenantDataService TenantDataService) ReadTenant(tenantID system.UUID) (contract.Tenant, error)

ReadTenant retrieves an existing tenant. tenantID: Mandatory: The unique identifier of the existing tenant. Returns either the tenant information or error if something goes wrong.

func (TenantDataService) UpdateApplication

func (tenantDataService TenantDataService) UpdateApplication(tenantID system.UUID, applicationID system.UUID, application contract.Application) error

UpdateApplication updates an existing tenant application. tenantID: Mandatory: The unique identifier of the existing tenant. applicationID: Mandatory: The unique identifier of the existing application. application: Mandatory. The reference to the updated application information. Returns error if something goes wrong.

func (TenantDataService) UpdateTenant

func (tenantDataService TenantDataService) UpdateTenant(tenantID system.UUID, tenant contract.Tenant) error

UpdateTenant updates an existing tenant. tenantID: Mandatory: The unique identifier of the existing tenant. tenant: Mandatory. The reference to the updated tenant information. Returns error if something goes wrong.

Jump to

Keyboard shortcuts

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