Documentation ¶
Index ¶
- type Service
- func (s *Service) AcceptAgreement(ctx context.Context, userContext am.UserContext, accepted bool) (oid int, uid int, err error)
- func (s *Service) Create(ctx context.Context, userContext am.UserContext, user *am.User) (oid int, uid int, ucid string, err error)
- func (s *Service) Delete(ctx context.Context, userContext am.UserContext, userID int) (oid int, err error)
- func (s *Service) Get(ctx context.Context, userContext am.UserContext, userEmail string) (oid int, user *am.User, err error)
- func (s *Service) GetByCID(ctx context.Context, userContext am.UserContext, userCID string) (oid int, user *am.User, err error)
- func (s *Service) GetByID(ctx context.Context, userContext am.UserContext, userID int) (oid int, user *am.User, err error)
- func (s *Service) GetWithOrgID(ctx context.Context, userContext am.UserContext, orgID int, userCID string) (oid int, user *am.User, 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.UserFilter) (oid int, users []*am.User, err error)
- func (s *Service) Update(ctx context.Context, userContext am.UserContext, user *am.User, userID int) (oid int, uid 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 (*Service) AcceptAgreement ¶
func (*Service) Create ¶
func (s *Service) Create(ctx context.Context, userContext am.UserContext, user *am.User) (oid int, uid int, ucid string, err error)
Create a new user, set status to active
func (*Service) Delete ¶
func (s *Service) Delete(ctx context.Context, userContext am.UserContext, userID int) (oid int, err error)
Delete the user
func (*Service) Get ¶
func (s *Service) Get(ctx context.Context, userContext am.UserContext, userEmail string) (oid int, user *am.User, err error)
Get user by their email address
func (*Service) GetByCID ¶
func (s *Service) GetByCID(ctx context.Context, userContext am.UserContext, userCID string) (oid int, user *am.User, err error)
GetByCID user by user custom id
func (*Service) GetByID ¶
func (s *Service) GetByID(ctx context.Context, userContext am.UserContext, userID int) (oid int, user *am.User, err error)
GetByID to be called with system context
func (*Service) GetWithOrgID ¶
func (s *Service) GetWithOrgID(ctx context.Context, userContext am.UserContext, orgID int, userCID string) (oid int, user *am.User, err error)
GetWithOrgID for internal lookups instead of getting orgID from context we pass it directly (system/support 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.