organization

package
v1.62.0 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2018 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Scope

type Scope struct {
	Runtime *env.Runtime
}

Scope provides data access to MySQL.

func (Scope) AddOrganization

func (s Scope) AddOrganization(ctx domain.RequestContext, org org.Organization) (err error)

AddOrganization inserts the passed organization record into the organization table.

func (Scope) CheckDomain

func (s Scope) CheckDomain(ctx domain.RequestContext, domain string) string

CheckDomain makes sure there is an organisation with the correct domain

func (Scope) DeleteOrganization

func (s Scope) DeleteOrganization(ctx domain.RequestContext, orgID string) (rows int64, err error)

DeleteOrganization deletes the orgID organization from the organization table.

func (Scope) GetOrganization

func (s Scope) GetOrganization(ctx domain.RequestContext, id string) (org org.Organization, err error)

GetOrganization returns the Organization reocrod from the organization database table with the given id.

func (Scope) GetOrganizationByDomain

func (s Scope) GetOrganizationByDomain(subdomain string) (o org.Organization, err error)

GetOrganizationByDomain returns the organization matching a given URL subdomain. No context is required because user might not be authenticated yet.

func (Scope) RemoveOrganization

func (s Scope) RemoveOrganization(ctx domain.RequestContext, orgID string) (err error)

RemoveOrganization sets the orgID organization to be inactive, thus executing a "soft delete" operation.

func (Scope) UpdateAuthConfig

func (s Scope) UpdateAuthConfig(ctx domain.RequestContext, org org.Organization) (err error)

UpdateAuthConfig updates the given organization record in the database with the auth config details.

func (Scope) UpdateOrganization

func (s Scope) UpdateOrganization(ctx domain.RequestContext, org org.Organization) (err error)

UpdateOrganization updates the given organization record in the database to the values supplied.

Jump to

Keyboard shortcuts

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