schemas

package
v0.0.0-...-0686fb6 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomError

type CustomError struct {
	Code       int    `json:"code"`
	HTTPStatus int    `json:"http_status"`
	Message    string `json:"message"`
}

func (*CustomError) Error

func (ce *CustomError) Error() string

type GeneralResponse

type GeneralResponse struct {
	Success bool        `json:"success"`
	Code    string      `json:"code,omitempty"`
	Message string      `json:"message,omitempty"`
	Data    interface{} `json:"data,omitempty"`
}

type Login

type Login struct {
	Identifier string `json:"identifier" binding:"required"`
	Password   string `json:"password" binding:"required"`
}

type Register

type Register struct {
	Username string `json:"username" binding:"required"`
	Email    string `json:"email" binding:"required,email"`
	Password string `json:"password" binding:"required"`
}

TODO: validate string length TODO: validate must not have whitespace TODO: validate username cannot use special characters except -_.

func (*Register) Prepare

func (r *Register) Prepare()

Jump to

Keyboard shortcuts

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