chaos

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Apr 22, 2024 License: MIT Imports: 16 Imported by: 11

Documentation

Index

Constants

View Source
const (
	// Version is the current Version of chaos
	Version = `0.5.2`
)

Variables

View Source
var (
	IsSDK = true
)

Functions

This section is empty.

Types

type BBQData added in v0.1.5

type BBQData struct {
	Domain            string   `json:"domain"`
	Subdomain         string   `json:"subdomain"`
	StatusCode        string   `json:"dns-status-code"`
	A                 []string `json:"a,omitempty"`
	CNAME             []string `json:"cname,omitempty"`
	AAAA              []string `json:"aaaa,omitempty"`
	MX                []string `json:"mx,omitempty"`
	SOA               []string `json:"soa,omitempty"`
	NS                []string `json:"ns,omitempty"`
	Wildcard          bool     `json:"wildcard"`
	HTTPUrl           string   `json:"http_url,omitempty"`
	HTTPStatusCode    int      `json:"http_status_code,omitempty"`
	HTTPContentLength int      `json:"http_content_length,omitempty"`
	HTTPTitle         string   `json:"http_title,omitempty"`
}

type BBQResult added in v0.1.5

type BBQResult struct {
	Data   []byte
	Reader *io.ReadCloser
	Error  error
}

type Client

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

Client is a client for making requests to chaos API

func New

func New(apiKey string) *Client

New creates a new client for chaos API communication

func (*Client) GetBBQSubdomains added in v0.1.5

func (c *Client) GetBBQSubdomains(req *SubdomainsRequest) chan *BBQResult

func (*Client) GetStatistics

func (c *Client) GetStatistics(req *GetStatisticsRequest) (*GetStatisticsResponse, error)

GetStatistics returns the statistics for a given domain.

func (*Client) GetSubdomains

func (c *Client) GetSubdomains(req *SubdomainsRequest) chan *Result

GetSubdomains returns the subdomains for a given domain.

func (*Client) PutSubdomains

func (c *Client) PutSubdomains(req *PutSubdomainsRequest) (*PutSubdomainsResponse, error)

PutSubdomains uploads the subdomains to Chaos API.

type GetStatisticsRequest

type GetStatisticsRequest struct {
	Domain string
}

GetStatisticsRequest is the request for a domain statistics

type GetStatisticsResponse

type GetStatisticsResponse struct {
	Subdomains uint64 `json:"subdomains"`
}

GetStatisticsResponse is the response for a statistics request

type InvalidStatusCodeError added in v0.3.0

type InvalidStatusCodeError struct {
	StatusCode int
	Message    []byte
}

func (InvalidStatusCodeError) Error added in v0.3.0

func (e InvalidStatusCodeError) Error() string

type PutSubdomainsRequest

type PutSubdomainsRequest struct {
	Contents io.Reader
}

PutSubdomainsRequest is the request for uploading subdomains.

type PutSubdomainsResponse

type PutSubdomainsResponse struct{}

PutSubdomainsResponse is the response for a subdomains upload request.

type Result

type Result struct {
	Subdomain string
	Reader    *io.ReadCloser
	Error     error
}

Result is the response for a host subdomains.

type SubdomainsRequest added in v0.1.5

type SubdomainsRequest struct {
	Domain       string
	OutputFormat string
}

SubdomainsRequest is the request for a host subdomains.

Jump to

Keyboard shortcuts

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