api

package
v0.0.0-...-c9f412c Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2016 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 ListArgs

type ListArgs struct {
	Offset, By    int
	Phone, IP     string
	Before, After time.Time
}

ListArgs - аргументы метода List

type Record

type Record struct {
	Stamp         time.Time `xorm:"pk created"`
	IP            string    `xorm:"ip pk"`
	Phone, Status string
}

Record - таблица журнала авторизаций

type Records

type Records []Record

Records - массив строк журнала

type Service

type Service struct {
	Log     *log.Logger
	DB      *database.DB
	Field   string // Context field for Sessiondata
	IPField string // `long:"logger_realip_field" default:"real-ip" description:"Context field for Real ip"`
}

Service holds service attributes

func New

func New(logger *log.Logger, db *database.DB) *Service

New - Конструктор сервера API

func (*Service) List

func (srv *Service) List(r *http.Request, args *ListArgs, result *Records) error

List - выборка строк из журнала

Jump to

Keyboard shortcuts

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