Documentation ¶
Overview ¶
Package user provides utilites for managing users with MDM.
Index ¶
- func MakeApplyUserEndpoint(svc Service) endpoint.Endpoint
- func MakeListUsersEndpoint(svc Service) endpoint.Endpoint
- func MarshalUser(u *User) ([]byte, error)
- func RegisterHTTPHandlers(r *mux.Router, e Endpoints, options ...httptransport.ServerOption)
- func UnmarshalUser(data []byte, u *User) error
- type Endpoints
- type ListUsersOption
- type Service
- type Store
- type User
- type UserService
- type Worker
- type WorkerStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeApplyUserEndpoint ¶
func MakeListUsersEndpoint ¶
func MarshalUser ¶
func RegisterHTTPHandlers ¶
func RegisterHTTPHandlers(r *mux.Router, e Endpoints, options ...httptransport.ServerOption)
func UnmarshalUser ¶
Types ¶
type Endpoints ¶
func MakeServerEndpoints ¶
func MakeServerEndpoints(s Service, outer endpoint.Middleware, others ...endpoint.Middleware) Endpoints
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)
type Worker ¶
type Worker struct {
// contains filtered or unexported fields
}
func NewWorker ¶
func NewWorker(db WorkerStore, subscriber pubsub.Subscriber, logger log.Logger) *Worker
Source Files ¶
Click to show internal directories.
Click to hide internal directories.