users

package
v0.5.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 12, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateAPIKeyRequest

type CreateAPIKeyRequest struct {
	Name          string `json:"name" validate:"required"`
	ExpiresInDays int    `json:"expires_in_days"`
}

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(userService user.Service, authService auth.Service, cfg *config.Config) *Handler

func (*Handler) Routes

func (h *Handler) Routes() []common.Route

type ListUsersResponse

type ListUsersResponse struct {
	Users  []*user.User `json:"users"`
	Total  int          `json:"total"`
	Limit  int          `json:"limit"`
	Offset int          `json:"offset"`
}

type LoginRequest

type LoginRequest struct {
	Username string `json:"username" validate:"required"`
	Password string `json:"password" validate:"required"`
}

type OAuthLinkRequest

type OAuthLinkRequest struct {
	UserID         string                 `json:"user_id" validate:"required"`
	Provider       string                 `json:"provider" validate:"required"`
	ProviderUserID string                 `json:"provider_user_id" validate:"required"`
	UserInfo       map[string]interface{} `json:"user_info" validate:"required"`
}

type TokenResponse

type TokenResponse struct {
	AccessToken            string `json:"access_token"`
	TokenType              string `json:"token_type"`
	ExpiresIn              int64  `json:"expires_in"`
	RequiresPasswordChange bool   `json:"requires_password_change"`
	RedirectURI            string `json:"redirect_uri,omitempty"`
}

type UpdatePasswordRequest added in v0.2.0

type UpdatePasswordRequest struct {
	NewPassword string `json:"new_password" validate:"required,min=8"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL