login

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2020 License: MIT Imports: 10 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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