redisclient

package
v0.0.0-...-72c2bb7 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrNilConnection pool returned nil for a connection.
	ErrNilConnection = errors.New("pool returned nil for redis connection")
)

Functions

This section is empty.

Types

type Client

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

Client wraps access to the ElasticCache/redis server.

func New

func New(url, password string) *Client

New creates a new redis client backed by a redis pool. New can take an address, or a url if url starts with rediss:// TLS will be assumed and we *will* match ServerName with whatever the url host name is. Do NOT PASS AN IP ADDRESS FOR rediss:// TLS CONNECTIONS.

func (*Client) Get

func (c *Client) Get() redis.Conn

Get a client from the pool and return to caller

func (*Client) GetContext

func (c *Client) GetContext(ctx context.Context) (redis.Conn, error)

GetContext a client from the pool with a context and return to caller

func (*Client) Init

func (c *Client) Init() error

Init initializes the redis connection pool and runs a test command.

func (*Client) Return

func (c *Client) Return(conn redis.Conn) error

Return the connection (just close it)

func (*Client) Subscribe

func (c *Client) Subscribe(ctx context.Context, onStart state.SubOnStart, onMessage state.SubOnMessage, channels ...string) error

Subscribe with cancel ability to channels

type RedisKeys

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

func NewRedisKeys

func NewRedisKeys(orgID, groupID int) *RedisKeys

func (*RedisKeys) Addr

func (r *RedisKeys) Addr(addrHash string) string

Addr returns the address key based on supplied addr id

func (*RedisKeys) AddrExistsHash

func (r *RedisKeys) AddrExistsHash() string

func (*RedisKeys) AddrMatch

func (r *RedisKeys) AddrMatch() string

func (*RedisKeys) AddrWorkQueue

func (r *RedisKeys) AddrWorkQueue() string

func (*RedisKeys) BigDataZone

func (r *RedisKeys) BigDataZone(zone string) string

BigDataZone key for determining if we should look up domain in bigdata

func (*RedisKeys) BruteConfig

func (r *RedisKeys) BruteConfig() string

func (*RedisKeys) BruteConfigHosts

func (r *RedisKeys) BruteConfigHosts() string

func (*RedisKeys) BruteETLD

func (r *RedisKeys) BruteETLD(etld string) string

func (*RedisKeys) BruteZone

func (r *RedisKeys) BruteZone(zone string) string

BruteZone key for determining if we should brute force or not

func (*RedisKeys) Config

func (r *RedisKeys) Config() string

func (*RedisKeys) KeywordConfig

func (r *RedisKeys) KeywordConfig() string

func (*RedisKeys) MutateZone

func (r *RedisKeys) MutateZone(zone string) string

MutateZone key for determining if we should mutate zone or not

func (*RedisKeys) NSConfig

func (r *RedisKeys) NSConfig() string

func (*RedisKeys) NSServers

func (r *RedisKeys) NSServers() string

func (*RedisKeys) NSZone

func (r *RedisKeys) NSZone(zone string) string

NSZone key for determining if we should do ns records or not

func (*RedisKeys) NSZones

func (r *RedisKeys) NSZones() string

func (*RedisKeys) PortBannerResults

func (r *RedisKeys) PortBannerResults(host, proto string) string

func (*RedisKeys) PortConfig

func (r *RedisKeys) PortConfig() string

func (*RedisKeys) PortConfigAllowedHosts

func (r *RedisKeys) PortConfigAllowedHosts() string

func (*RedisKeys) PortConfigAllowedTLDs

func (r *RedisKeys) PortConfigAllowedTLDs() string

func (*RedisKeys) PortConfigDisallowedHosts

func (r *RedisKeys) PortConfigDisallowedHosts() string

func (*RedisKeys) PortConfigDisallowedTLDs

func (r *RedisKeys) PortConfigDisallowedTLDs() string

func (*RedisKeys) PortConfigPorts

func (r *RedisKeys) PortConfigPorts() string

func (*RedisKeys) PortConfigTCPPorts

func (r *RedisKeys) PortConfigTCPPorts() string

func (*RedisKeys) PortConfigUDPPorts

func (r *RedisKeys) PortConfigUDPPorts() string

func (*RedisKeys) PortIP

func (r *RedisKeys) PortIP(host string) string

func (*RedisKeys) PortResults

func (r *RedisKeys) PortResults(host, proto string) string

func (*RedisKeys) PortZone

func (r *RedisKeys) PortZone(zone string) string

PortZone key for determining if we should do a port scan for this hostname/ip

func (*RedisKeys) Status

func (r *RedisKeys) Status() string

func (*RedisKeys) WebConfig

func (r *RedisKeys) WebConfig() string

func (*RedisKeys) WebZone

func (r *RedisKeys) WebZone(zone string) string

WebZone key for determining if we should mutate zone or not

Jump to

Keyboard shortcuts

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