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 MemorySessionStore
- type RedisSessionStore
- type Serie
- type Series
- type Sock
- func (s *Sock) AddListener(path string)
- func (s *Sock) GetFilter() *Filter
- func (s *Sock) HandleMessage(msg *SockMessage)
- 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) GetSock(userId int, sockId string) *Sock
- func (sm *SockCMap) GetSocks(userId int) *cmap.ConcurrentMap[string, *Sock]
- func (sm *SockCMap) Push(log *_types.Log)
- func (sm *SockCMap) Register(s *Sock)
- func (sm *SockCMap) SetFilter(userId int, sockId string, filter *Filter) bool
- func (sm *SockCMap) SetSessionStore(store SockSessionStore)
- func (sm *SockCMap) String() string
- func (sm *SockCMap) Unregister(s *Sock)
- type SockMessage
- type SockSession
- type SockSessionStore
- type States
- 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 {
// 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
func (j *LogPackageJoiner) Add(lp *_types.LogPackage) (complete bool, joined *_types.LogPackage)
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 MemorySessionStore ¶ added in v1.20.6
type MemorySessionStore struct{}
func (MemorySessionStore) Del ¶ added in v1.20.6
func (s MemorySessionStore) Del(key string) error
func (MemorySessionStore) Get ¶ added in v1.20.6
func (s MemorySessionStore) Get(key string) (*SockSession, error)
func (MemorySessionStore) Set ¶ added in v1.20.6
func (s MemorySessionStore) Set(key string, value *SockSession) error
type RedisSessionStore ¶ added in v1.20.6
type RedisSessionStore struct {
// contains filtered or unexported fields
}
func NewRedisSessionStore ¶ added in v1.20.6
func (*RedisSessionStore) Del ¶ added in v1.20.6
func (store *RedisSessionStore) Del(key string) error
func (*RedisSessionStore) Get ¶ added in v1.20.6
func (store *RedisSessionStore) Get(key string) (*SockSession, error)
func (*RedisSessionStore) Set ¶ added in v1.20.6
func (store *RedisSessionStore) Set(key string, value *SockSession) error
type Sock ¶
type Sock struct { sync.RWMutex *SockSession SockSessionStore SockId string `json:"sock_id"` JwtToken string `json:"jwt_token"` *User `json:"user"` *Claims `json:"claims"` *websocket.Conn `json:"conn"` // TODO interface }
func (*Sock) AddListener ¶
func (*Sock) HandleMessage ¶ added in v1.20.6
func (s *Sock) HandleMessage(msg *SockMessage)
func (*Sock) HasListener ¶ added in v1.0.24
func (*Sock) RemoveListener ¶
type SockCMap ¶ added in v1.0.23
type SockCMap struct { SockSessionStore // contains filtered or unexported fields }
func NewSockCMap ¶ added in v1.20.6
func NewSockCMap() *SockCMap
func (*SockCMap) SetSessionStore ¶ added in v1.20.6
func (sm *SockCMap) SetSessionStore(store SockSessionStore)
func (*SockCMap) Unregister ¶ added in v1.20.6
type SockMessage ¶
type SockSession ¶ added in v1.20.6
type SockSessionStore ¶ added in v1.20.6
type SockSessionStore interface { Set(key string, value *SockSession) error Get(key string) (*SockSession, error) Del(key string) error }
Click to show internal directories.
Click to hide internal directories.