api

package
v0.28.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2025 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const JSONContentType string = "application/json"

JSONContentType is "application/json"

Variables

This section is empty.

Functions

func ActionNamesToEmailActions

func ActionNamesToEmailActions(o []string) []humiographql.SharedActionNameType

func ActionNotFound

func ActionNotFound(name string) error

func AggregateAlertNotFound

func AggregateAlertNotFound(name string) error

func AlertNotFound

func AlertNotFound(name string) error

func CloneHeader

func CloneHeader(in http.Header) http.Header

CloneHeader creates a deep copy of an http.Header.

func CloneRequest

func CloneRequest(req *http.Request) *http.Request

CloneRequest creates a shallow copy of the request along with a deep copy of the Headers.

func FilterAlertNotFound

func FilterAlertNotFound(name string) error

func GetActionNames

func GetActionNames(o []humiographql.SharedActionNameType) []string

GetActionNames takes a list of humiographql.SharedActionNameType and returns a string slice with names of all the actions

func IngestTokenNotFound

func IngestTokenNotFound(name string) error

func NewHttpTransport

func NewHttpTransport(config Config) *http.Transport

func ParserNotFound

func ParserNotFound(name string) error

func QueryOwnershipIsOrganizationOwnership

func QueryOwnershipIsOrganizationOwnership(v humiographql.SharedQueryOwnershipType) bool

func RepositoryNotFound

func RepositoryNotFound(name string) error

func ScheduledSearchNotFound

func ScheduledSearchNotFound(name string) error

func SearchDomainNotFound

func SearchDomainNotFound(name string) error

func TestDataToParserDetailsTestCasesParserTestCase

func TestDataToParserDetailsTestCasesParserTestCase(o []string) []humiographql.ParserDetailsTestCasesParserTestCase

func TestDataToParserTestCaseInput

func TestDataToParserTestCaseInput(o []string) []humiographql.ParserTestCaseInput

func UserNotFound

func UserNotFound(name string) error

func ViewNotFound

func ViewNotFound(name string) error

Types

type Client

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

func NewClient

func NewClient(config Config) *Client

func NewClientWithTransport

func NewClientWithTransport(config Config, httpTransport *http.Transport) *Client

func (*Client) Address

func (c *Client) Address() *url.URL

func (*Client) Config

func (c *Client) Config() Config

func (*Client) HTTPRequestContext

func (c *Client) HTTPRequestContext(ctx context.Context, httpMethod string, path string, body io.Reader, contentType string) (*http.Response, error)

func (*Client) MakeRequest

func (c *Client) MakeRequest(ctx context.Context, req *graphql.Request, resp *graphql.Response) error

func (*Client) Status

func (c *Client) Status(ctx context.Context) (*StatusResponse, error)

func (*Client) Token

func (c *Client) Token() string

type Config

type Config struct {
	Address          *url.URL
	UserAgent        string
	Token            string
	CACertificatePEM string
	Insecure         bool
	DialContext      func(ctx context.Context, network, addr string) (net.Conn, error)
}

type EntityNotFound

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

func (EntityNotFound) EntityType

func (e EntityNotFound) EntityType() entityType

func (EntityNotFound) Error

func (e EntityNotFound) Error() string

func (EntityNotFound) Key

func (e EntityNotFound) Key() string

type ErrorList

type ErrorList []*GraphqlError

func (ErrorList) Error

func (errs ErrorList) Error() string

type GraphqlError

type GraphqlError struct {
	Err        error                  `json:"-"`
	Message    string                 `json:"message"`
	Path       ast.Path               `json:"path,omitempty"`
	Locations  []gqlerror.Location    `json:"locations,omitempty"`
	Extensions map[string]interface{} `json:"extensions,omitempty"`
	Rule       string                 `json:"-"`
	State      map[string]string      `json:"state,omitempty"`
}

func (*GraphqlError) Error

func (err *GraphqlError) Error() string

type Response

type Response struct {
	Data       interface{}            `json:"data"`
	Extensions map[string]interface{} `json:"extensions,omitempty"`
	Errors     ErrorList              `json:"errors,omitempty"`
}

type StatusResponse

type StatusResponse struct {
	Version string
}

func (StatusResponse) AtLeast

func (s StatusResponse) AtLeast(ver string) (bool, error)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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