logs

package
v0.0.0-...-3b96593 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewLogsCommand

func NewLogsCommand() *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 ColorStrFunc

type ColorStrFunc func(format string, a ...interface{}) string

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 LogsData

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

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) (*Options, 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