types

package
v1.21.17 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2024 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

View Source
const (
	DASHKEY_SYSTEM_ID = 1
	DASHKEY_DEMO_ID   = 2
)
View Source
const (
	MEMBER_STATUS_REJECTED  = 0
	MEMBER_STATUS_APPROVED  = 1
	MEMBER_STATUS_INVITED   = 2
	MEMBER_STATUS_REQUESTED = 3
)
View Source
const (
	DASHBOARD_SYSTEM_ID = 1
	DASHBOARD_DEMO_ID   = 2
)
View Source
const (
	ROLE_ADMIN  = 1
	ROLE_USER   = 2
	ROLE_VIEWER = 3
	ROLE_DEMO   = 4
)
View Source
const (
	USER_LOGR_ID = 1
	USER_DEMO_ID = 2
)

Variables

This section is empty.

Functions

This section is empty.

Types

type CountVector added in v1.0.9

type CountVector _types.Count

func (*CountVector) AsVector added in v1.0.9

func (c *CountVector) AsVector() []interface{}

type Counts

type Counts []*_types.Count

func (Counts) Format

func (cs Counts) Format() Series

type DashKey

type DashKey struct {
	Id         int    `db:"id"          json:"id"`
	DashId     int    `db:"dash_id"     json:"dash_id"`
	Name       string `db:"name"        json:"name"`
	PublicKey  string `db:"public_key"  json:"public_key"`
	PrivateKey string `db:"private_key" json:"private_key"`
}

type DashKeyMap added in v1.20.18

type DashKeyMap map[int]*DashKey

type DashKeys

type DashKeys []*DashKey

func (DashKeys) Get added in v1.20.18

func (keys DashKeys) Get(id int) *DashKey

type DashMap added in v1.20.18

type DashMap map[int]*Dashboard

type DashMember

type DashMember struct {
	Id     int   `db:"id"      json:"id"`
	DashId int   `db:"dash_id" json:"dash_id"`
	UserId int   `db:"user_id" json:"user_id"`
	Status int   `db:"status"  json:"status"`
	User   *User `json:"user"`
}

type DashMembers

type DashMembers []*DashMember

func (DashMembers) ApprovedOnly

func (dm DashMembers) ApprovedOnly() DashMembers

func (DashMembers) ByDashId

func (dm DashMembers) ByDashId() map[int]*DashMember

func (DashMembers) ByUserId

func (dm DashMembers) ByUserId() map[int]*DashMember

func (DashMembers) DashIds

func (dm DashMembers) DashIds() []int

func (DashMembers) HasDash

func (dm DashMembers) HasDash(dashId int) *DashMember

func (DashMembers) HasUser

func (dm DashMembers) HasUser(userId int) *DashMember

type DashStatRow

type DashStatRow struct {
	DashId   int    `db:"dash_id"  json:"dash_id,omitempty"`
	Hostname string `db:"hostname" json:"hostname,omitempty"`
	Logname  string `db:"logname"  json:"logname"`
	Level    string `db:"level"    json:"level,omitempty"`
	Version  string `db:"version"  json:"version,omitempty"`
	Cnt      int    `db:"cnt"      json:"cnt"`
	Updated  int64  `db:"updated"  json:"updated,omitempty"`
	Message  string `db:"message"  json:"message,omitempty"`
}

type DashStatRows

type DashStatRows []*DashStatRow

type Dashboard

type Dashboard struct {
	Id      int         `db:"id"          json:"id"`
	OwnerId int         `db:"owner_id"    json:"owner_id"`
	Name    string      `db:"name"        json:"name"`
	Keys    DashKeys    `json:"keys"`
	Members DashMembers `json:"members"`
	Owner   *User       `json:"owner"`
}

type Dashboards

type Dashboards []*Dashboard

func (Dashboards) ByPrimary

func (ds Dashboards) ByPrimary() DashMap

func (Dashboards) Ids

func (ds Dashboards) Ids() []int

type Filter

type Filter struct {
	DashId    int       `json:"dash_id,omitempty"`
	Hostname  string    `json:"hostname,omitempty"`
	Logname   string    `json:"logname,omitempty"`
	Level     string    `json:"level,omitempty"`
	Pid       int       `json:"pid,omitempty"`
	Version   string    `json:"version,omitempty"`
	Message   string    `json:"message,omitempty"`
	Timestamp *[2]int64 `json:"timestamp,omitempty"`
	Pattern   string    `json:"pattern,omitempty"`
	Offset    int64     `json:"offset,omitempty"`
	Limit     int       `json:"limit,omitempty"`
	Keyname   string    `json:"keyname,omitempty"`
}

func (*Filter) Match

func (f *Filter) Match(log *_types.Log) bool

func (*Filter) String added in v1.21.0

func (f *Filter) String() string

func (*Filter) ToSQL added in v1.21.0

func (f *Filter) ToSQL() (string, []interface{}, error)

type LogPackageJoiner added in v1.0.6

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

func NewLogPackageJoiner added in v1.20.13

func NewLogPackageJoiner(delay time.Duration, tries int) *LogPackageJoiner

func (*LogPackageJoiner) Add added in v1.0.6

type LogPackageMeta added in v1.20.16

type LogPackageMeta struct {
	*_types.LogPackage
	Protocol string
	Size     int
}

type Serie

type Serie struct {
	Hostname string           `json:"hostname"`
	Keyname  string           `json:"keyname"`
	Kind     string           `json:"kind"`
	Data     [][2]interface{} `json:"data"`
}

type Series

type Series []*Serie

type States

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

func NewStates added in v1.20.16

func NewStates() *States

func (*States) Pop added in v1.0.24

func (s *States) Pop(state string) (string, bool)

func (*States) Push added in v1.0.24

func (s *States) Push(v string) string

func (*States) Set

func (s *States) Set(k string, v string)

type User

type User struct {
	Id        int        `db:"id"         json:"id"`
	GithubId  int64      `db:"github_id"  json:"github_id"`
	Username  string     `db:"username"   json:"username"`
	Role      int        `db:"role"       json:"role"`
	LoginAt   *time.Time `db:"login_at"   json:"login_at"`
	CreatedAt *time.Time `db:"created_at" json:"created_at"`
}

type Users

type Users []*User

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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