login

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2020 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Copyright 2019-2020 Axetroy. All rights reserved. MIT license.

Index

Constants

This section is empty.

Variables

View Source
var GetLoginLogRouter = router.Handler(func(c router.Context) {
	id := c.Param("log_id")

	c.ResponseFunc(nil, func() schema.Response {
		return GetLoginLog(id)
	})
})
View Source
var GetLoginLogsRouter = router.Handler(func(c router.Context) {
	var (
		query Query
	)

	c.ResponseFunc(c.ShouldBindQuery(&query), func() schema.Response {
		return GetLoginLogs(helper.NewContext(&c), query)
	})
})

Functions

func GetLatestLoginLog

func GetLatestLoginLog(c helper.Context) (res schema.Response)

func GetLoginLog

func GetLoginLog(id string) (res schema.Response)

func GetLoginLogs

func GetLoginLogs(c helper.Context, query Query) (res schema.Response)

Types

type Query

type Query struct {
	schema.Query
	Uid     *string `json:"uid" url:"uid" validate:"omitempty" comment:"用户ID"`                // 根据用户 ID 筛选
	Type    *int    `json:"type" url:"type" validate:"omitempty,number" comment:"类型"`         // 根据类型筛选
	Command *int    `json:"command" url:"command" validate:"omitempty,number" comment:"登陆命令"` // 根据登陆命令筛选
	Ip      *string `json:"ip" url:"ip" validate:"omitempty,ip" comment:"IP"`                 // 根据 IP 筛选
}

Jump to

Keyboard shortcuts

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