app

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Router *router = &router{echo.New()}

Functions

This section is empty.

Types

type Binder

type Binder struct{}

func (*Binder) Bind

func (*Binder) Bind(i interface{}, c echo.Context) (err error)

type Database

type Database struct {
	*gorm.DB
}
var DB *Database = &Database{}

func (*Database) Connect

func (d *Database) Connect()

func (*Database) Migrate

func (d *Database) Migrate()

type HomeController

type HomeController struct{}

type ResourceController

type ResourceController interface {
	// Returns a list of all of these resources
	List(echo.Context) error
	// Returns a specific resource (by id).
	Show(echo.Context) error
	// Creates a new instance of the resource.
	Create(echo.Context) error
	// Updates a resource.
	Update(echo.Context) error
	// Deletes a resource.
	Delete(echo.Context) error
}

Controller for a Model

type User

type User struct {
	gorm.Model
	FirstName,
	LastName string `validate:"alpha|required"`
}

type UserController

type UserController struct {
	ResourceController
	// contains filtered or unexported fields
}

func (UserController) Create

func (u UserController) Create(c echo.Context) error

func (UserController) List

func (UserController) List(c echo.Context) error

func (UserController) Show

func (u UserController) Show(c echo.Context) error

type Validator

type Validator struct {
	// contains filtered or unexported fields
}

func (*Validator) Validate

func (v *Validator) Validate(i interface{}) error

Jump to

Keyboard shortcuts

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