checks

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Oct 14, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package checks contains functions intended for Is, Has, etc. checks

Package checks contains functions intended for Is, Has, etc. checks

Package checks contains functions intended for Is, Has, etc. checks

Index

Constants

This section is empty.

Variables

View Source
var ErrEmailExists = errors.New("email already exists")

ErrEmailExists is returned when an email is already registered

View Source
var ErrUsernameExists = errors.New("username already exists")

ErrUsernameExists is returned when a username is already registered

View Source
var User *userService

User is the UserService instance

Functions

func InitChecks added in v0.0.4

func InitChecks(ctx context.Context, s *models.Service)

InitChecks initializes all the utility checks that require access to the database

func InitIP

func InitIP(c context.Context, s models.Querier)

InitIP initializes the IP service

func InitUser added in v0.0.4

func InitUser(ctx context.Context, s models.Querier)

InitUser initializes the UserService

Types

type IPService

type IPService struct {
	// contains filtered or unexported fields
}

IPService is the IP service

var IP *IPService

IP provides the IP service

func (*IPService) IsGlined

func (i *IPService) IsGlined(ip string) (bool, error)

IsGlined checks if an IP is g-lined Returns true if the IP is g-lined, false if not, and an error if there was an issue

func (*IPService) IsWhitelisted

func (i *IPService) IsWhitelisted(ip string) (bool, error)

IsWhitelisted checks if an IP is whitelisted in the database

Jump to

Keyboard shortcuts

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