storage

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2017 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Redis

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

func NewRedisClient

func NewRedisClient(options *redis.Options) *Redis

func (*Redis) Close

func (r *Redis) Close() error

func (*Redis) Del

func (r *Redis) Del(ip *model.IP) bool

func (*Redis) RangeOne

func (r *Redis) RangeOne(protocol string) (ip *model.IP, err error)

func (*Redis) Save

func (r *Redis) Save(ip *model.IP) error

type Storage

type Storage interface {
	Save(ip *model.IP) error
	Del(ip *model.IP) bool
	RangeOne(protocol string) (ip *model.IP, err error)
	Close() error
}

Jump to

Keyboard shortcuts

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