usage

package
v0.0.0-...-144d91b Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

func NewUsage

func NewUsage(repo postgres.Repository, bucketRepo bucket.Storage,
	logger *zap.Logger, config *config.Config) *Handler

func (*Handler) AddToBlacklist

func (u *Handler) AddToBlacklist(ctx context.Context, subnet string) error

func (*Handler) AddToWhitelist

func (u *Handler) AddToWhitelist(ctx context.Context, subnet string) error

func (*Handler) Auth

func (u *Handler) Auth(ctx context.Context, login string, password string, ip string) error

func (*Handler) Drop

func (u *Handler) Drop(ctx context.Context, login string, ip string) error

func (*Handler) RemoveFromBlacklist

func (u *Handler) RemoveFromBlacklist(ctx context.Context, subnet string) error

func (*Handler) RemoveFromWhitelist

func (u *Handler) RemoveFromWhitelist(ctx context.Context, subnet string) error

type Usage

type Usage interface {
	Auth(ctx context.Context, login string, password string, ip string) error
	Drop(ctx context.Context, login string, ip string) error
	AddToBlacklist(ctx context.Context, subnet string) error
	RemoveFromBlacklist(ctx context.Context, subnet string) error
	AddToWhitelist(ctx context.Context, subnet string) error
	RemoveFromWhitelist(ctx context.Context, subnet string) error
}

Jump to

Keyboard shortcuts

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