views

package
v0.0.0-...-412dc8c Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2021 License: Apache-2.0, MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AdminGetUserResponse

type AdminGetUserResponse struct {
	AdminUserReadView
}

type AdminUserCreateRequest

type AdminUserCreateRequest struct {
	Email    string
	Role     string
	Password string
}

type AdminUserCreateResponse

type AdminUserCreateResponse struct {
	AdminUserReadView
}

type AdminUserReadView

type AdminUserReadView struct {
	ID        uint
	Email     string
	FirstName string
	LastName  string
	Role      string
}

type LoginRequest

type LoginRequest struct {
	Email    string `json:"email" validate:"required,email"`
	Password string `json:"password" validate:"required"`
}

type LoginResponse

type LoginResponse struct {
	UserID    uint      `json:"user_id"`
	Email     string    `json:"email"`
	FirstName string    `json:"first_name"`
	LastName  string    `json:"last_name"`
	Role      string    `json:"role"`
	Token     string    `json:"token"`
	IssuedAt  time.Time `json:"issued_at"`
	NotBefore time.Time `json:"not_before"`
	ExpiresAt time.Time `json:"expires_at"`
}

type PaginatedResponse

type PaginatedResponse struct {
	StatusCode uint16
	Error      null.String `swaggertype:"string"`
	Data       interface{}
	Count      uint
	Total      uint
	Links      ResponseLinks
}

type Response

type Response struct {
	StatusCode uint16        `json:"status_code"`
	Error      null.String   `json:"error" swaggertype:"string"`
	Data       interface{}   `json:"data"`
	Links      ResponseLinks `json:"_links"`
}

func Success

func Success(value interface{}) Response
type ResponseLinks struct {
	Self string      `json:"_self"`
	Prev null.String `json:"_prev,omitempty" swaggertype:"string"`
	Next null.String `json:"_next,omitempty" swaggertype:"string"`
}

Jump to

Keyboard shortcuts

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