api

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

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

Go to latest
Published: Jan 12, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicController

type BasicController struct {
	Logger LoggerService

	Session *sessions.Session
}

BasicController : Basic Controller

func (*BasicController) AfterActivation

func (c *BasicController) AfterActivation(a mvc.AfterActivation)

AfterActivation : After Activation

func (*BasicController) BeforeActivation

func (c *BasicController) BeforeActivation(b mvc.BeforeActivation)

BeforeActivation : Before Activation

func (*BasicController) Custom

func (c *BasicController) Custom() string

Custom : Custom

func (*BasicController) Get

func (c *BasicController) Get() string

Get : Get

type BasicSubController

type BasicSubController struct {
	Session *sessions.Session
}

BasicSubController : Basic Sub Controller

func (*BasicSubController) Get

func (c *BasicSubController) Get() string

Get : Get

type LoggerService

type LoggerService interface {
	Log(string)
}

LoggerService : Logger Service

type PostsController

type PostsController struct {
	// context is auto-binded by Iris on each request,
	// remember that on each incoming request iris creates a new UserController each time,
	// so all fields are request-scoped by-default, only dependency injection is able to set
	// custom fields like the Service which is the same for all requests (static binding)
	// and the Session which depends on the current context (dynamic binding).
	Ctx iris.Context

	// Our UserService, it's an interface which
	// is binded from the main application.
	Service services.PostService

	// Session, binded using dependency injection from the main.go.
	Session *sessions.Session
}

func (*PostsController) Get

func (c *PostsController) Get() string

func (*PostsController) GetAll

func (c *PostsController) GetAll() string

func (*PostsController) GetOne

func (c *PostsController) GetOne() *json.JsonResult

type PrefixedLogger

type PrefixedLogger struct {
	Prefix string
}

PrefixedLogger : Prefixed Logger

func (*PrefixedLogger) Log

func (s *PrefixedLogger) Log(msg string)

Log : Log

type UserController

type UserController struct {
	// context is auto-binded by Iris on each request,
	// remember that on each incoming request iris creates a new UserController each time,
	// so all fields are request-scoped by-default, only dependency injection is able to set
	// custom fields like the Service which is the same for all requests (static binding)
	// and the Session which depends on the current context (dynamic binding).
	Ctx iris.Context

	// Our UserService, it's an interface which
	// is binded from the main application.
	Service services.UserService

	// Session, binded using dependency injection from the main.go.
	Session *sessions.Session
}

func (*UserController) Get

func (c *UserController) Get() string

func (*UserController) GetAll

func (c *UserController) GetAll() string

func (*UserController) GetLogin

func (c *UserController) GetLogin() *json.JsonResult

func (*UserController) GetOne

func (c *UserController) GetOne() *json.JsonResult

Jump to

Keyboard shortcuts

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