Documentation
¶
Index ¶
- Variables
- type Service
- func (s *Service) CreateUser(request entity.UserCreateRequest) (entity.UserContext, error)
- func (s *Service) DeleteUser(uuid string) error
- func (s *Service) GetCurrentSession(token string) (entity.Session, error)
- func (s *Service) GetServerStatus() (entity.ServerStatus, error)
- func (s *Service) GetUserContextByUUID(uuid string) (entity.UserContext, error)
- func (s *Service) ListUsers() ([]entity.User, error)
- func (s *Service) Login(loginRequest entity.UserLoginRequest) (entity.Session, error)
- func (s *Service) SaveSession(sessionID string, userContext entity.UserContext) (entity.Session, error)
- func (s *Service) SetupServer(createUserRequest entity.UserCreateRequest) (entity.Session, error)
- func (s *Service) UpdateUser(request entity.UserUpdateRequest) (entity.UserContext, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var DefaultThemeColorDark = "#00bfff"
DefaultThemeColorDark for new users
View Source
var DefaultThemeColorLight = "#0057ad"
DefaultThemeColorLight for new users
View Source
var ErrInvalidLogin = errors.New("Invalid Login")
ErrInvalidLogin is when the login credentials are incorrect
View Source
var ErrMissingValidSession = errors.New("No Valid Session")
ErrMissingValidSession is when there is no valid session
View Source
var ErrServerAlreadySetup = errors.New("Server Already Setup")
ErrServerAlreadySetup is when the server is already setup
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct { Logger *log.Logger HTTPLogger *log.Logger ErrorLogger *log.Logger AuditLogger *log.Logger DebugLogger *log.Logger Rollbar *rollbar.Client // contains filtered or unexported fields }
Service is the internal API of Hub
func NewService ¶
NewService returns a production instance of the service
func (*Service) CreateUser ¶
func (s *Service) CreateUser(request entity.UserCreateRequest) (entity.UserContext, error)
CreateUser creates a User
func (*Service) DeleteUser ¶
DeleteUser deletes a user
func (*Service) GetCurrentSession ¶
GetCurrentSession gets the current session
func (*Service) GetServerStatus ¶
func (s *Service) GetServerStatus() (entity.ServerStatus, error)
GetServerStatus gets the status for the server
func (*Service) GetUserContextByUUID ¶
func (s *Service) GetUserContextByUUID(uuid string) (entity.UserContext, error)
GetUserContextByUUID by UUID and get the full conext
func (*Service) SaveSession ¶
func (s *Service) SaveSession(sessionID string, userContext entity.UserContext) (entity.Session, error)
SaveSession saves a session
func (*Service) SetupServer ¶
SetupServer sets up the server
func (*Service) UpdateUser ¶
func (s *Service) UpdateUser(request entity.UserUpdateRequest) (entity.UserContext, error)
UpdateUser updates the full user context
Click to show internal directories.
Click to hide internal directories.