Documentation ¶
Index ¶
Constants ¶
Variables ¶
This section is empty.
Functions ¶
func CreatToken ¶
Types ¶
type Auth ¶
type Auth struct { AuthToken string AuthEndpoint string Backend AuthenticationBackend }
func AuthFromConfig ¶
type AuthenticationBackend ¶
type AuthenticationBackend interface { Authenticate(authParams map[string]string) (interface{}, error) GetRoles() Roles GetRole(id string) Role GetUsers() interface{} GetUser(id string) interface{} DeleteUser(id string) error UpdateUser(id string, userData map[string]string) (interface{}, error) CreateUser(id string, userData map[string]string) (interface{}, error) CreateRole(roleData map[string]string) (Role, error) UpdateRole(roleData map[string]string) (Role, error) }
type Permission ¶
func (*Permission) CanCreate ¶
func (p *Permission) CanCreate() bool
func (*Permission) CanDelete ¶
func (p *Permission) CanDelete() bool
func (*Permission) CanRead ¶
func (p *Permission) CanRead() bool
func (*Permission) CanUpdate ¶
func (p *Permission) CanUpdate() bool
type Permissions ¶
type Permissions []Permission
type Role ¶
type Role struct { Id string `json:"id"` Name string `json:"name"` Permissions Permissions `json:"permissions"` }
Click to show internal directories.
Click to hide internal directories.