model

package
v0.0.0-...-5f60b6e Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type User

type User struct {
	ID   int
	Name string
	Role string
}

User is a user

type Users

type Users []User

Users is a list of users

func (Users) Exists

func (u Users) Exists(id int) bool

Exists checks if a user with the given id exists in the list

func (Users) FindByName

func (u Users) FindByName(name string) (User, error)

FindByName returns the user with the given name, or returns an error

Jump to

Keyboard shortcuts

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