models

package
v0.0.0-...-c877efe Latest Latest
Warning

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

Go to latest
Published: Mar 31, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Id          int    `json:"id"`
	Name        string `json:"name"`
	Description string `json:"description"`
	OwnerId     int    `json:"ownerId"`
	CreatedAt   string `json:"created_at"`
}

func (*Item) Bind

func (i *Item) Bind(r *http.Request) error

func (*Item) Render

func (*Item) Render(w http.ResponseWriter, r *http.Request) error

type ItemList

type ItemList struct {
	Items []Item `json:"items"`
}

func (*ItemList) Render

func (*ItemList) Render(w http.ResponseWriter, r *http.Request) error

type User

type User struct {
	// Id       int      `json:"id" sql:"id"`
	Id       int      `json:"id"`
	Name     string   `json:"name"`
	Username string   `json:"username"`
	Password string   `json:"password"`
	Roles    []string `json:"roles"`
}

func (*User) Bind

func (user *User) Bind(request *http.Request) error

func (*User) Render

func (*User) Render(w http.ResponseWriter, r *http.Request) error

type UserList

type UserList struct {
	Users []User `json:"users"`
}

func (*UserList) Render

func (*UserList) Render(w http.ResponseWriter, r *http.Request) error

Jump to

Keyboard shortcuts

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