types

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 23, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BlacklistValidation

func BlacklistValidation(field string) validation.RuleFunc

func DatetimeValidation

func DatetimeValidation(field string) validation.RuleFunc

Types

type CreateEmailRequest added in v1.0.2

type CreateEmailRequest struct {
	Email string `json:"email"`
}

func (CreateEmailRequest) Validate added in v1.0.2

func (r CreateEmailRequest) Validate() interface{}

type CreateUserRequest

type CreateUserRequest struct {
	Name   string               `json:"name"`
	Emails []CreateEmailRequest `json:"emails"`
}

func (CreateUserRequest) Validate

func (r CreateUserRequest) Validate() interface{}

type DeleteUserRequest

type DeleteUserRequest struct {
	ID string `param:"id" json:"id"`
}

func (DeleteUserRequest) Validate

func (r DeleteUserRequest) Validate() interface{}

type EditUserRequest

type EditUserRequest struct {
	ID     string               `param:"id" json:"id"`
	Name   string               `json:"name"`
	Emails []CreateEmailRequest `json:"emails"`
}

func (EditUserRequest) Validate

func (r EditUserRequest) Validate() interface{}

type GetUserRequest

type GetUserRequest struct {
	PaginatorRequest
	ID string `query:"id" json:"id"`
}

func (GetUserRequest) Validate

func (r GetUserRequest) Validate() interface{}

type HTTPResponse added in v1.0.3

type HTTPResponse struct {
	Headers    map[string][]string
	Body       interface{}
	StatusCode int
	Error      error
}

type MainResponse

type MainResponse struct {
	Code        string      `json:"code"`
	Description string      `json:"description"`
	Data        interface{} `json:"data"`
}

type PaginatorRequest

type PaginatorRequest struct {
	Page                  int    `query:"page" json:"page"`
	Limit                 int    `query:"limit" json:"limit"`
	OrderBy               string `query:"orderBy" json:"orderBy"`
	SortBy                string `query:"sortBy" json:"sortBy"`
	Search                string `query:"search" json:"search"`
	DisableCalculateTotal string `query:"disableCalculateTotal" json:"disableCalculateTotal"`
}

type PaginatorResponse

type PaginatorResponse struct {
	Data     interface{} `json:"data"`
	Total    int64       `json:"total"`
	NextPage bool        `json:"nextPage"`
}

Jump to

Keyboard shortcuts

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