Documentation ¶
Overview ¶
Package user provides utilites for managing users with MDM.
Index ¶
- func MakeApplyUserEndpoint(svc Service) endpoint.Endpoint
- func MakeHTTPHandler(e Endpoints, logger log.Logger) *mux.Router
- func MakeListUsersEndpoint(svc Service) endpoint.Endpoint
- func MarshalUser(u *User) ([]byte, error)
- func UnmarshalUser(data []byte, u *User) error
- type Endpoints
- type ListUsersOption
- type Service
- type Store
- type User
- type UserService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeApplyUserEndpoint ¶
func MakeListUsersEndpoint ¶
func MarshalUser ¶
func UnmarshalUser ¶
Types ¶
type ListUsersOption ¶
type Service ¶
type Service interface { ApplyUser(ctx context.Context, u User) (*User, error) ListUsers(ctx context.Context, opt ListUsersOption) ([]User, error) }
func NewHTTPClient ¶
func NewHTTPClient(instance, token string, logger log.Logger, opts ...httptransport.ClientOption) (Service, error)
type User ¶
type User struct { UUID string `json:"uuid"` UDID string `json:"udid"` UserID string `json:"user_id"` UserShortname string `json:"user_shortname"` UserLongname string `json:"user_longname"` AuthToken string `json:"auth_token"` PasswordHash []byte `json:"password_hash"` Hidden bool `json:"hidden"` }
func NewFromRequest ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func New ¶
func New(store Store) *UserService
func (*UserService) ListUsers ¶
func (svc *UserService) ListUsers(ctx context.Context, opts ListUsersOption) ([]User, error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.