api

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Mar 12, 2019 License: ISC Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	APIKey                string    `json:"api_key"`
	BillingSubscriptionID string    `json:"billing_subscription_id"`
	Environment           string    `json:"environment"`
	ExternalProvider      *string   `json:"external_provider"`
	Id                    string    `json:"id"`
	InsertedAt            time.Time `json:"inserted_at"`
	LanguageType          *string   `json:"language_type"`
	LogLineFormat         string    `json:"log_line_format"`
	Name                  string    `json:"name"`
	OrganizationId        string    `json:"organization_id"`
	PlatformType          string    `json:"platform_type"`
	Slug                  string    `json:"slug"`
	SourceType            string    `json:"source_type"`
	Tags                  []string  `json:"tags"`
	UpdatedAt             time.Time `json:"updated_at"`
}

type Client

type Client struct {
	APIKey string
	Host   string
	// contains filtered or unexported fields
}

func NewClient

func NewClient(host string, apiKey string) *Client

func (*Client) GetSavedView

func (c *Client) GetSavedView(id string) (*SavedView, error)

func (*Client) ListApplications

func (c *Client) ListApplications() ([]*Application, error)

func (*Client) ListOrganizations

func (c *Client) ListOrganizations() ([]*Organization, error)

func (*Client) ListSavedViews

func (c *Client) ListSavedViews() ([]*SavedView, error)

func (*Client) Request

func (c *Client) Request(method string, path string, requestStruct interface{}, responseStruct interface{}) error

func (*Client) Search

func (c *Client) Search(appIds []string, datetimeGreaterThan time.Time, query string) ([]*LogLine, error)

func (*Client) SetLogger

func (c *Client) SetLogger(l Logger)

type LogLine

type LogLine struct {
	ID            string    `json:"id"`
	ApplicationID string    `json:"application_id"`
	Datetime      time.Time `json:"dt"`
	Level         string    `json:"level"`
	Message       string    `json:"message"`

	Fields map[string]interface{}
}

type Logger

type Logger interface {
	Printf(string, ...interface{})
}

type Organization

type Organization struct {
	APIKey                string    `json:"api_key"`
	BillingSubscriptionID string    `json:"billing_subscription_id"`
	Environment           string    `json:"environment"`
	ExternalProvider      *string   `json:"external_provider"`
	Id                    string    `json:"id"`
	InsertedAt            time.Time `json:"inserted_at"`
	LanguageType          *string   `json:"language_type"`
	LogLineFormat         string    `json:"log_line_format"`
	Name                  string    `json:"name"`
	OrganizationID        string    `json:"organization_id"`
	PlatformType          string    `json:"platform_type"`
	Slug                  string    `json:"slug"`
	SourceType            string    `json:"source_type"`
	Tags                  []string  `json:"tags"`
	UpdatedAt             time.Time `json:"updated_at"`
}

type SavedView

type SavedView struct {
	ChartSettings   interface{} `json:"chart_settings"`
	ConsoleSettings struct {
		DtGte         *string  `json:"dt_gte"`
		DtLte         *string  `json:"dt_lte"`
		Facets        []string `json:"facets"`
		LogLineFormat string   `json:"log_line_format"`
		Query         *string  `json:"query"`
		SourceIds     []string `json:"source_ids"`
	} `json:"console_settings"`
	Id             string `json:"id"`
	Name           string `json:"name"`
	OrganizationId string `json:"organization_id"`
	Type           string `json:"type"`
}

TODO fill out chart settings

Jump to

Keyboard shortcuts

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