Documentation ¶
Index ¶
- type Scope
- func (s Scope) AddOrganization(ctx domain.RequestContext, org org.Organization) (err error)
- func (s Scope) CheckDomain(ctx domain.RequestContext, domain string) string
- func (s Scope) DeleteOrganization(ctx domain.RequestContext, orgID string) (rows int64, err error)
- func (s Scope) GetOrganization(ctx domain.RequestContext, id string) (org org.Organization, err error)
- func (s Scope) GetOrganizationByDomain(subdomain string) (o org.Organization, err error)
- func (s Scope) RemoveOrganization(ctx domain.RequestContext, orgID string) (err error)
- func (s Scope) UpdateAuthConfig(ctx domain.RequestContext, org org.Organization) (err error)
- func (s Scope) UpdateOrganization(ctx domain.RequestContext, org org.Organization) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scope ¶
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 ¶
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.