Documentation ¶
Index ¶
- type Service
- func (s *Service) Create(ctx context.Context, userContext am.UserContext, org *am.Organization, ...) (oid int, uid int, ocid string, ucid string, err error)
- func (s *Service) Delete(ctx context.Context, userContext am.UserContext, orgID int) (oid int, err error)
- func (s *Service) Get(ctx context.Context, userContext am.UserContext, orgName string) (oid int, org *am.Organization, err error)
- func (s *Service) GetByAppClientID(ctx context.Context, userContext am.UserContext, orgAppClientID string) (oid int, org *am.Organization, err error)
- func (s *Service) GetByCID(ctx context.Context, userContext am.UserContext, orgCID string) (oid int, org *am.Organization, err error)
- func (s *Service) GetByID(ctx context.Context, userContext am.UserContext, orgID int) (oid int, org *am.Organization, err error)
- func (s *Service) Init(config []byte) error
- func (s *Service) IsAuthorized(ctx context.Context, userContext am.UserContext, resource, action string) bool
- func (s *Service) List(ctx context.Context, userContext am.UserContext, filter *am.OrgFilter) (orgs []*am.Organization, err error)
- func (s *Service) Update(ctx context.Context, userContext am.UserContext, org *am.Organization) (oid int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service for interfacing with postgresql/rds
func New ¶
func New(roleManager auth.RoleManager, authorizer auth.Authorizer) *Service
New returns an Organization Service with a role manager and authorizer
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, userContext am.UserContext, org *am.Organization, userCID string) (oid int, uid int, ocid string, ucid string, err error)
Create a new organization, and intialize the user + roles, system users only.
func (*Service) Delete ¶
func (s *Service) Delete(ctx context.Context, userContext am.UserContext, orgID int) (oid int, err error)
Delete the organization
func (*Service) Get ¶
func (s *Service) Get(ctx context.Context, userContext am.UserContext, orgName string) (oid int, org *am.Organization, err error)
Get organization by organization name, system user only.
func (*Service) GetByAppClientID ¶
func (s *Service) GetByAppClientID(ctx context.Context, userContext am.UserContext, orgAppClientID string) (oid int, org *am.Organization, err error)
GetByOrgAppClientID organization by ID, system user only.
func (*Service) GetByCID ¶
func (s *Service) GetByCID(ctx context.Context, userContext am.UserContext, orgCID string) (oid int, org *am.Organization, err error)
GetByCID organization by organization customer id
func (*Service) GetByID ¶
func (s *Service) GetByID(ctx context.Context, userContext am.UserContext, orgID int) (oid int, org *am.Organization, err error)
GetByID organization by ID, system user only.
func (*Service) IsAuthorized ¶
func (s *Service) IsAuthorized(ctx context.Context, userContext am.UserContext, resource, action string) bool
IsAuthorized checks if an action is allowed by a particular user
Click to show internal directories.
Click to hide internal directories.