api

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// BadRequest - HTTP Bad Request
	BadRequest = 400
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Credential

type Credential struct {
	Email    string `json:"email"`
	Password string `json:"password"`
}

Credential - A result credential

func (*Credential) IsBlank

func (cred *Credential) IsBlank() bool

IsBlank - Password appears to be blank

func (*Credential) IsHash

func (cred *Credential) IsHash() bool

IsHash - Password *appears* to a hash

type QuerySet

type QuerySet struct {
	Email  string `json:"email"`
	Domain string `json:"domain"`
	User   string `json:"user"`
	Page   int    `json:"page"`
}

QuerySet - A LeakDB query

type ResultSet

type ResultSet struct {
	Count   int          `json:"count"`
	Page    int          `json:"page"`
	Pages   int          `json:"pages"`
	Results []Credential `json:"results"`
}

ResultSet - Result of a query

type Server

type Server struct {
	JSONFile    string
	EmailIndex  string
	UserIndex   string
	DomainIndex string

	TLSCertificate string
	TLSKey         string
}

Server - A server object

func (*Server) SearchHandler

func (s *Server) SearchHandler(resp http.ResponseWriter, req *http.Request)

SearchHandler - Process search requests

func (*Server) Start

func (s *Server) Start(host string, port uint16)

Start - Start server

func (*Server) StartTLS

func (s *Server) StartTLS(host string, port uint16)

StartTLS - Start TLS server

Jump to

Keyboard shortcuts

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