Documentation ¶ Index ¶ func BasicAuth(db ApiUserRepository) func(next http.Handler) http.Handler type ApiUser func NewApiUser(id uuid.UUID, name string, password []byte) ApiUser func (u ApiUser) CheckPassword(password string) error type ApiUserRepository Constants ¶ This section is empty. Variables ¶ This section is empty. Functions ¶ func BasicAuth ¶ func BasicAuth(db ApiUserRepository) func(next http.Handler) http.Handler Types ¶ type ApiUser ¶ type ApiUser struct { Id uuid.UUID Name string Password []byte } func NewApiUser ¶ func NewApiUser(id uuid.UUID, name string, password []byte) ApiUser func (ApiUser) CheckPassword ¶ func (u ApiUser) CheckPassword(password string) error type ApiUserRepository ¶ type ApiUserRepository interface { GetApiUsers() ([]ApiUser, error) GetApiUserById(id uuid.UUID) (ApiUser, error) GetApiUserByName(name string) (ApiUser, error) SetApiUser(a ApiUser) error DeleteApiUserById(id uuid.UUID) error } Source Files ¶ View all Source files api_user.go auth.go repository.go Click to show internal directories. Click to hide internal directories.