model

package
v0.0.0-...-580e7f5 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2025 License: MIT Imports: 1 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNotFound represents a resource not found (404)
	ErrNotFound = errors.New("not found")

	// ErrUnauthorized represents a Forbidden (403)
	ErrUnauthorized = errors.New("unauthorized")

	// ErrEmpty is returned when input string is empty
	ErrEmpty = errors.New("empty string")
)

Functions

This section is empty.

Types

type LoginRequest

type LoginRequest struct {
	Username string `json:"username" pact:"example=sally"`
	Password string `json:"password" pact:"example=badpassword"`
}

LoginRequest is the login request API struct.

type LoginResponse

type LoginResponse struct {
	User *User `json:"user"`
}

LoginResponse is the login response API struct.

type User

type User struct {
	FirstName string `json:"firstName" pact:"example=Sally"`
	LastName  string `json:"lastName" pact:"example=McSmiley Face😀😍"`
	Username  string `json:"username" pact:"example=sally"`
	Type      string `json:"type" pact:"example=admin,regex=^(admin|user|guest)$"`
	ID        int    `json:"id" pact:"example=10"`
}

User is a representation of a User. Dah.

Jump to

Keyboard shortcuts

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