Documentation
¶
Index ¶
- func CreateUser(ctx context.Context, user *UserCreate) error
- func DeleteUser(ctx context.Context, id string) error
- func DisableUser(ctx context.Context, id string) error
- func EnableUser(ctx context.Context, id string) error
- func InitializeAuthenticationService()
- func UpdateUser(ctx context.Context, id string, user *UserUpdate) error
- type AuthenticationContext
- type IAuthenticationContext
- type User
- type UserCreate
- type UserUpdate
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUser ¶
func CreateUser(ctx context.Context, user *UserCreate) error
func InitializeAuthenticationService ¶
func InitializeAuthenticationService()
func UpdateUser ¶
func UpdateUser(ctx context.Context, id string, user *UserUpdate) error
Types ¶
type AuthenticationContext ¶
type AuthenticationContext struct {
// contains filtered or unexported fields
}
AuthenticationContext is the external user struct
func GetAuthenticationContext ¶
func GetAuthenticationContext(ctx context.Context) *AuthenticationContext
GetAuthenticationContext return the authentication context inside the context
func NewAuthenticationContext ¶
func NewAuthenticationContext(tenantID, userID string) *AuthenticationContext
NewAuthenticationContext returns a pointer of authentication context
func (*AuthenticationContext) GetTenantID ¶
func (a *AuthenticationContext) GetTenantID() string
GetTenantID returns the tenant id
func (*AuthenticationContext) GetUserID ¶
func (a *AuthenticationContext) GetUserID() string
GetUserID returns the user id
func (*AuthenticationContext) SetInContext ¶
func (a *AuthenticationContext) SetInContext(ctx context.Context) context.Context
SetInContext returns a context with authentication inside
func (*AuthenticationContext) String ¶
func (a *AuthenticationContext) String() string
String returns the details of auth context
func (*AuthenticationContext) Valid ¶
func (a *AuthenticationContext) Valid() bool
Valid returns a boolean if the context is valid
type IAuthenticationContext ¶
IAuthenticationContext is the external user contract
type User ¶
type UserCreate ¶
Click to show internal directories.
Click to hide internal directories.