security

package
v0.0.0-...-b84af7b Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps interface {
	Mgo() *mgo.Database
	Cache() *goredis.Redis
}

type IpAddress

type IpAddress struct {
	Id      bson.ObjectId   `bson:"_id,omitempty" json:"id,omitempty"`
	Address string          `bson:"address" json:"address"`
	Users   []bson.ObjectId `bson:"users" json:"users"`
	Banned  bool            `bson:"banned" json:"banned"`
}

type Module

type Module struct {
	Redis *goredis.Redis `inject:""`
}

func (Module) TrustIP

func (module Module) TrustIP(address string) bool

func (Module) TrustUserIP

func (module Module) TrustUserIP(address string, usr *user.One) bool

Jump to

Keyboard shortcuts

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