users

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2024 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(
	jctx *lib.JournalistContext,
	fiberRouter *fiber.Router,
)

Types

type UserCreateModel

type UserCreateModel struct {
	Username string `json:"username" validate:"required,alphanum,max=32"`
	Password string `json:"password" validate:"required"`
	Role     string `json:"role" validate:"required"`
}

type UserCreateResponse

type UserCreateResponse struct {
	Success bool           `json:"success"`
	User    *UserShowModel `json:"user"`
	Message string         `json:"message"`
}

type UserListResponse

type UserListResponse struct {
	Success bool             `json:"success"`
	Users   *[]UserShowModel `json:"users"`
	Message string           `json:"message"`
}

type UserShowModel

type UserShowModel struct {
	ID       string `json:"id"`
	Username string `json:"username"`
	Role     string `json:"role"`
}

type UserShowResponse

type UserShowResponse struct {
	Success bool           `json:"success"`
	User    *UserShowModel `json:"user"`
	Message string         `json:"message"`
}

type UserUpdateModel

type UserUpdateModel struct {
	Password string `json:"password,omitempty" validate:"omitempty,min=5"`
	Role     string `json:"role,omitempty" validate:"omitempty"`
}

type UserUpdateResponse

type UserUpdateResponse struct {
	Success bool           `json:"success"`
	User    *UserShowModel `json:"user"`
	Message string         `json:"message"`
}

Jump to

Keyboard shortcuts

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