models

package
v0.0.0-...-1cc7bd7 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddTodo

func AddTodo(task string, createdBy string) (uint, error)

func DeleteTodo

func DeleteTodo(id int) error

func MarkComplete

func MarkComplete(id int) error

func Setup

func Setup()

Types

type Creds

type Creds struct {
	Cid       string
	Csecret   string
	Ccallback string
}

type Todo

type Todo struct {
	gorm.Model
	Task      string
	CreatedBy string
	Completed bool
}

func GetTodos

func GetTodos() ([]Todo, error)

type User

type User struct {
	Sub           string `json:"sub"`
	Name          string `json:"name"`
	GivenName     string `json:"given_name"`
	FamilyName    string `json:"family_name"`
	Profile       string `json:"profile"`
	Picture       string `json:"picture"`
	Email         string `json:"email"`
	EmailVerified bool   `json:"email_verified"`
	Gender        string `json:"gender"`
}

User is a retrieved and authentiacted user.

Jump to

Keyboard shortcuts

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