Documentation ¶
Index ¶
- Constants
- type Claims
- type CountVector
- type Counts
- type DashKey
- type DashKeys
- type DashMember
- type DashMembers
- func (dm DashMembers) ApprovedOnly() DashMembers
- func (ds DashMembers) ByDashId() map[int]*DashMember
- func (ds DashMembers) ByUserId() map[int]*DashMember
- func (dm DashMembers) DashIds() []int
- func (ds DashMembers) HasDash(dashId int) *DashMember
- func (ds DashMembers) HasUser(userId int) *DashMember
- type DashStatRow
- type DashStatRows
- type Dashboard
- type Dashboards
- type Filter
- type LogPackageJoiner
- type LogPackageRow
- type Serie
- type Series
- type Sock
- func (s *Sock) AddListener(path string)
- func (s *Sock) GetFilter() *Filter
- func (s *Sock) HasListener(path string) bool
- func (s *Sock) IsExpired() bool
- func (s *Sock) IsPaused() bool
- func (s *Sock) RemoveListener(path string)
- func (s *Sock) SendLog(lg *_types.Log) error
- func (s *Sock) SetFilter(f *Filter)
- func (s *Sock) SetPaused(state bool)
- type SockCMap
- func (sm *SockCMap) Add(s *Sock)
- func (sm *SockCMap) Delete(userId int, sockId string) bool
- func (sm *SockCMap) GetSock(userId int, sockId string) *Sock
- func (sm *SockCMap) GetSocks(userId int) *cmap.ConcurrentMap[string, *Sock]
- func (sm SockCMap) Init() *SockCMap
- func (sm *SockCMap) PushLog(lg *_types.Log) int
- func (sm *SockCMap) SetFilter(userId int, sockId string, filter *Filter) bool
- func (sm *SockCMap) SetPaused(userId int, sockId string, state bool) bool
- func (sm *SockCMap) String() string
- type SockMessage
- type States
- type UID
- type User
- type Users
Constants ¶
View Source
const ( MemberStatusRejected = 0 MemberStatusApproved = 1 MemberStatusInvited = 2 MemberStatusRequested = 3 )
View Source
const ( DashboardSystemId = 1 DashboardDemoId = 2 )
View Source
const ( RoleAdmin = 1 RoleUser = 2 RoleViewer = 3 RoleDemo = 4 )
View Source
const ( UserLogrId = 1 UserDemoId = 2 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Claims ¶
type Claims struct { Id int `json:"id"` Role int `json:"role"` GihubId int64 `json:"github_id"` Username string `json:"username"` AccessToken string `json:"access_token,omitempty"` AccessTokenCipher string `json:"access_token_cipher"` jwt.RegisteredClaims }
func (*Claims) DecryptAccessToken ¶
func (*Claims) EncryptAccessToken ¶
type CountVector ¶ added in v1.0.9
func (*CountVector) AsVector ¶ added in v1.0.9
func (c *CountVector) AsVector() []interface{}
type DashMember ¶
type DashMembers ¶
type DashMembers []*DashMember
func (DashMembers) ApprovedOnly ¶
func (dm DashMembers) ApprovedOnly() DashMembers
func (DashMembers) ByDashId ¶
func (ds DashMembers) ByDashId() map[int]*DashMember
func (DashMembers) ByUserId ¶
func (ds DashMembers) ByUserId() map[int]*DashMember
func (DashMembers) DashIds ¶
func (dm DashMembers) DashIds() []int
func (DashMembers) HasDash ¶
func (ds DashMembers) HasDash(dashId int) *DashMember
func (DashMembers) HasUser ¶
func (ds 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 Dashboards ¶
type Dashboards []*Dashboard
func (Dashboards) ByPrimary ¶
func (ds Dashboards) ByPrimary() map[int]*Dashboard
func (Dashboards) Ids ¶
func (ds Dashboards) Ids() []int
type Filter ¶
type Filter struct { DashId int `json:"dash_id"` Hostname string `json:"hostname"` Logname string `json:"logname"` Level string `json:"level"` Pid int `json:"pid"` Version string `json:"version"` Message string `json:"message"` Timestamp [2]int64 `json:"timestamp"` Pattern string `json:"pattern"` Offset int64 `json:"offset"` Limit int `json:"limit"` Keyname string `json:"keyname"` }
type LogPackageJoiner ¶ added in v1.0.6
type LogPackageJoiner struct { sync.RWMutex Data map[string]LogPackageRow }
func (*LogPackageJoiner) Add ¶ added in v1.0.6
func (m *LogPackageJoiner) Add(lp *_types.LogPackage, tries int) (complete bool, joined *_types.LogPackage)
func (*LogPackageJoiner) Drop ¶ added in v1.0.6
func (m *LogPackageJoiner) Drop(uid string)
type LogPackageRow ¶ added in v1.0.6
type LogPackageRow []*_types.LogPackage
func (LogPackageRow) Joined ¶ added in v1.0.6
func (row LogPackageRow) Joined() (complete bool, joined *_types.LogPackage)
type Sock ¶
type Sock struct { sync.RWMutex SockId string `json:"sock_id"` Listeners map[string]int `json:"listeners"` Paused bool `json:"paused"` *User `json:"user"` *Filter `json:"filter"` *Claims `json:"claims"` *websocket.Conn `json:"conn"` // TODO interface }
func (*Sock) AddListener ¶
func (*Sock) HasListener ¶ added in v1.0.24
func (*Sock) RemoveListener ¶
type SockCMap ¶ added in v1.0.23
type SockCMap struct {
// contains filtered or unexported fields
}
type SockMessage ¶
Click to show internal directories.
Click to hide internal directories.