Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ToProtobuf ¶ added in v0.0.2
func ToTlsProtobuf ¶ added in v0.0.2
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 EncryptionConfig ¶ added in v0.0.2
type FileDescription ¶
type FileDescription struct {
Name string `json:"name"`
NickName string `json:"nick_name"`
Path string `json:"path"`
Size int64 `json:"size"`
Command string `json:"command"`
}
func (*FileDescription) ToJsonString ¶ added in v0.0.2
func (td *FileDescription) ToJsonString() (string, error)
type Operator ¶
type Operator struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
Name string `gorm:"uniqueIndex"`
Remote string `gorm:"type:string;"`
Type string `gorm:"type:string;"`
}
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 Pipeline ¶ added in v0.0.2
type Pipeline struct {
ID uuid.UUID `gorm:"primaryKey;->;<-:create;type:uuid;"`
CreatedAt time.Time `gorm:"->;<-:create;"`
ListenerID string `gorm:"type:string;"`
Name string `gorm:"type:string"`
WebPath string `gorm:"type:string;default:''"`
Host string `config:"host"`
Port uint16 `config:"port"`
Type string `gorm:"type:string;"`
Enable bool `gorm:"type:boolean;"`
Tls TlsConfig `gorm:"embedded;embeddedPrefix:tls_"`
Encryption EncryptionConfig `gorm:"embedded;embeddedPrefix:encryption_"`
}
Pipeline
func ProtoBufToDB ¶ added in v0.0.2
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
IsRemoved bool `gorm:"default:false"`
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) ToFileProtobuf ¶ added in v0.0.2
func (*Task) ToProtobuf ¶
type TlsConfig ¶ added in v0.0.2
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.