Documentation ¶
Index ¶
- Constants
- func InitResource(router *gin.RouterGroup, path string, s service) (r resource, err error)
- func InitService(store StoreService, admin AdminService, session SessionService, ...) (s service, err error)
- type AccountRegister
- type AdminService
- type Crypt
- type InternalLoggin
- type Rights
- type SessionService
- type StoreService
Constants ¶
View Source
const ( CONTENT_TYPE = "Content-Type" CONTENT_TYPE_JSON = "application/json" AUTHORIZATION = "Authorization" )
View Source
const ( PW_SALT_BYTES = 32 PW_HASH_BYTES = 64 )
Variables ¶
This section is empty.
Functions ¶
func InitResource ¶
func InitResource(router *gin.RouterGroup, path string, s service) (r resource, err error)
func InitService ¶
func InitService(store StoreService, admin AdminService, session SessionService, ctx context.Context) (s service, err error)
Types ¶
type AccountRegister ¶
type AdminService ¶ added in v0.11.0
type InternalLoggin ¶
type SessionService ¶
type SessionService interface { Create(accountId uuid.UUID) (accessToken session.AccessToken, err error) Renew(token string) (accessToken session.AccessToken, err error) Validate(token string) (accessToken session.AccessToken, accountId uuid.UUID, err error) }
type StoreService ¶
type StoreService interface { Register(account types.Account) (err error) Link(login types.Login) (err error) Accounts() (accounts []types.Account, err error) GetById(id uuid.UUID) (user types.Account, err error) GetLogin(username string) (login types.Login, err error) GetByUsername(username string) (user types.Account, err error) }
Click to show internal directories.
Click to hide internal directories.