model

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CloudLoggingLog

type CloudLoggingLog struct {
	Severity string `json:"severity"`
	Payload  any    `json:"payload"`
	InsertID string `json:"insert_id"`
	LogName  string `json:"log_name"`
	Trace    string `json:"trace"`
	SpanID   string `json:"span_id"`

	Resource       *monitoredres.MonitoredResource `json:"resource"`
	SourceLocation *logging.LogEntrySourceLocation `json:"source_location"`
}

type Command

type Command struct {
	Command string   `toml:"command"`
	Options []string `toml:"options"`
}

type Context

type Context struct {
	context.Context
}

func NewContext

func NewContext(options ...CtxOption) *Context

func (*Context) New

func (x *Context) New(options ...CtxOption) *Context

type CtxOption

type CtxOption func(ctx *Context)

func WithCtx

func WithCtx(base context.Context) CtxOption

type ExportLogsResponse

type ExportLogsResponse struct {
	Logs      []*Log    `json:"logs"`
	NextToken NextToken `json:"next_token"`
}

type GoogleProjectID

type GoogleProjectID string

type Log

type Log struct {
	ID        LogID
	Timestamp *time.Time `json:"timestamp"`
	Tag       string     `json:"tag"`
	Data      any        `json:"data"`
}

func NewLog

func NewLog(ts *time.Time, tag string, data any) *Log

type LogID

type LogID string

func NewLogID

func NewLogID() LogID

type Message

type Message struct {
	Log   *Log
	Error error
}

type NextToken

type NextToken string

type Period

type Period interface {
	Begin() time.Time
	End() time.Time
}

func NewPeriod

func NewPeriod(baseTime, duration string, rangeType RangeType) (Period, error)

type RangeType

type RangeType string

type RepositoryGetInput

type RepositoryGetInput struct {
	Limit  uint64
	Token  NextToken
	Filter func(log *Log) []*Log
}

type RepositoryGetOutput

type RepositoryGetOutput struct {
	Logs      []*Log
	NextToken NextToken
}

type RunMode

type RunMode int
const (
	ConsoleMode RunMode = iota + 1
	BrowserMode
)

func ToRunMode

func ToRunMode(mode string) (RunMode, error)

Jump to

Keyboard shortcuts

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