model

package
v0.0.0-...-878580d Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateToken

func CreateToken(token string) int

func InsertTodo

func InsertTodo(todo Todo) int

Types

type Todo

type Todo struct {
	Id   int    `json:"id" example:"1" format:"int32"`
	Text string `json:"text" example:"Go get groceries"`
}

func FindTodo

func FindTodo(id int) (Todo, error)

func GetTodos

func GetTodos() []Todo

func SearchTodos

func SearchTodos(substring string) ([]Todo, error)

type Token

type Token struct {
	Id    int    `json:"id" example:"1" format:"int32"`
	Token string `json:"token" example:"Token for auth"`
}

func GetToken

func GetToken(token string) (Token, error)

func SearchToken

func SearchToken(tokenVal string) (token Token, found bool)

Jump to

Keyboard shortcuts

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