logs

package
v1.3.4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultConfigFile = "~/.swo-cli.yml"
	DefaultAPIURL     = "https://api.na-01.cloud.solarwinds.com"
)

Variables

View Source
var (
	ErrInvalidAPIResponse = errors.New("Received non-2xx status code")
	ErrInvalidDateTime    = errors.New("Could not parse timestamp")
	ErrNoContent          = errors.New("No content")
)

Functions

func NewGetCommand added in v1.3.0

func NewGetCommand() *cli.Command

func NewLogsCommand

func NewLogsCommand() *cli.Command

Types

type Client

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

func NewClient

func NewClient(opts *Options) (*Client, error)

func (*Client) Run

func (c *Client) Run(ctx context.Context) error

type GetLogsResponse added in v1.3.1

type GetLogsResponse struct {
	Logs     []Log `json:"logs"`
	PageInfo `json:"pageInfo"`
}

type Log

type Log struct {
	Time     time.Time `json:"time"`
	Message  string    `json:"message"`
	Hostname string    `json:"hostname"`
	Severity string    `json:"severity"`
	Program  string    `json:"program"`
}

type Options

type Options struct {
	APIURL string `yaml:"api-url"`
	Token  string `yaml:"token"`
	// contains filtered or unexported fields
}

func (*Options) Init

func (opts *Options) Init(args []string) error

type PageInfo

type PageInfo struct {
	PrevPage string `json:"prevPage"`
	NextPage string `json:"nextPage"`
}

Jump to

Keyboard shortcuts

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