Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Certificate ¶
type Certificate struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
CommonName string
CAType int
KeyType string
CertificatePEM string
PrivateKeyPEM string
}
Certificate - Certificate database model
func (*Certificate) BeforeCreate ¶
func (c *Certificate) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook to automatically set values
type FileDescription ¶
type FileDescription struct {
Name string `json:"name"`
Path string `json:"path"`
Size int64 `json:"size"`
Command string `json:"command"`
}
func (*FileDescription) ToJson ¶
func (td *FileDescription) ToJson() (string, error)
type Listener ¶
type Listener struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Name string `gorm:"uniqueIndex"`
}
Listener
type Operator ¶
type Operator struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Name string `gorm:"uniqueIndex"`
}
Operator - Colletions of content to serve from HTTP(S)
type Os ¶
type Os struct {
Name string `gorm:"type:varchar(255)" json:"name"`
Version string `gorm:"type:varchar(255)" json:"version"`
Arch string `gorm:"type:varchar(255)" json:"arch"`
Username string `gorm:"type:varchar(255)" json:"username"`
Hostname string `gorm:"type:varchar(255)" json:"hostname"`
Locale string `gorm:"type:varchar(255)" json:"locale"`
}
type Process ¶
type Process struct {
Name string `gorm:"type:varchar(255)" json:"name"`
Pid int32 `json:"pid"`
Ppid int32 `json:"ppid"`
Owner string `gorm:"type:varchar(255)" json:"owner"`
Arch string `gorm:"type:varchar(255)" json:"arch"`
Path string `gorm:"type:varchar(255)" json:"path"`
Args string `gorm:"type:varchar(255)" json:"args"`
}
type Session ¶
type Session struct {
SessionID string `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Note string
GroupName string
RemoteAddr string
ListenerId string
IsAlive bool
Modules string
Extensions string
Os *Os `gorm:"embedded"`
Process *Process `gorm:"embedded"`
Time *Timer `gorm:"embedded"`
Last time.Time
}
func ConvertToSessionDB ¶
func (*Session) ToClientProtobuf ¶
func (*Session) ToRegisterProtobuf ¶
func (s *Session) ToRegisterProtobuf() *lispb.RegisterSession
type Task ¶
type Task struct {
ID string `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Type string
SessionID string
Session Session `gorm:"foreignKey:SessionID"`
Cur int
Total int
Description string
}
func (*Task) BeforeCreate ¶
BeforeCreate - GORM hook
func (*Task) ToDescProtobuf ¶
func (*Task) ToProtobuf ¶
type WebContent ¶
type WebContent struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
WebsiteID uuid.UUID `gorm:"type:uuid;"`
Website Website `gorm:"foreignKey:WebsiteID;"`
Path string `gorm:"primaryKey"`
Size uint64
ContentType string
}
WebContent - One piece of content mapped to a path
func WebContentFromProtobuf ¶
func WebContentFromProtobuf(pbWebContent *lispb.WebContent) WebContent
func (*WebContent) BeforeCreate ¶
func (wc *WebContent) BeforeCreate(tx *gorm.DB) (err error)
BeforeCreate - GORM hook to automatically set values
func (*WebContent) ToProtobuf ¶
func (wc *WebContent) ToProtobuf(content *[]byte) *lispb.WebContent
ToProtobuf - Converts to protobuf object
type Website ¶
type Website struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Name string `gorm:"unique;"` // Website Name
WebContents []WebContent
}
Website - Colletions of content to serve from HTTP(S)
func (*Website) BeforeCreate ¶
BeforeCreate - GORM hook
Click to show internal directories.
Click to hide internal directories.