Documentation
¶
Index ¶
- Constants
- Variables
- func AddCertificate(caType int, keyType string, commonName string, cert []byte, key []byte) error
- func AddContent(pbWebContent *lispb.WebContent, webContentDir string) (*lispb.WebContent, error)
- func AddTask(typ string, task *core.Task, td *models.FileDescription) error
- func AddWebSite(webSiteName string, webContentDir string) (*lispb.Website, error)
- func CreateOperator(name string, typ string, remoteAddr string) error
- func CreatePipeline(ppProto *lispb.Pipeline) error
- func DeleteAllCertificates() error
- func DeleteCertificate(name string) error
- func DeleteSession(sessionID string) error
- func FindAliveSessions() ([]*lispb.RegisterSession, error)
- func FindAllSessions() (*clientpb.Sessions, error)
- func FindPipeline(name, listenerID string) (models.Pipeline, error)
- func FindSession(sessionID string) (*lispb.RegisterSession, error)
- func FindTaskAndMaxTasksID(sessionID string) ([]*models.Task, int, error)
- func FindTasksWithNonOneCurTotal(session models.Session) ([]models.Task, error)
- func GetAllTasks(sessionID string) ([]models.Task, error)
- func GetTaskDescriptionByID(taskID string) (*models.FileDescription, error)
- func GetWebContentIDByWebsiteID(websiteID string) ([]string, error)
- func HasOperator(typ string) (bool, error)
- func ListClients() ([]models.Operator, error)
- func ListListeners() ([]models.Operator, error)
- func ListPipelines(listenerID string, pipelineType string) ([]models.Pipeline, error)
- func NewDBClient() *gorm.DB
- func Open(dsn string) gorm.Dialector
- func RemoveContent(id string) error
- func RemoveWebAllContent(id string) error
- func RemoveWebSite(id string) error
- func SaveCertificate(certificate *models.Certificate) error
- func Session() *gorm.DB
- func ToTask(task models.Task) (*core.Task, error)
- func UpdateLast(sessionID string) error
- func UpdateSession(sessionID, note, group string) error
- func UpdateSessionInfo(coreSession *core.Session) error
- func UpdateSessionStatus() error
- func UpdateTask(task *core.Task, newCur int) error
- func WebContentByIDAndPath(id string, path string, webContentDir string, eager bool) (*lispb.WebContent, error)
- func WebsiteByName(name string, webContentDir string) (*lispb.Website, error)
- func Websites(webContentDir string) ([]*lispb.Website, error)
- type Dialector
- func (dialector Dialector) BindVarTo(writer clause.Writer, stmt *gorm.Statement, v interface{})
- func (dialector Dialector) ClauseBuilders() map[string]clause.ClauseBuilder
- func (dialector Dialector) DataTypeOf(field *schema.Field) string
- func (dialector Dialector) DefaultValueOf(field *schema.Field) clause.Expression
- func (dialector Dialector) Explain(sql string, vars ...interface{}) string
- func (dialector Dialector) Initialize(db *gorm.DB) (err error)
- func (dialector Dialector) Migrator(db *gorm.DB) gorm.Migrator
- func (dialector Dialector) Name() string
- func (dialector Dialector) QuoteTo(writer clause.Writer, str string)
- func (dialectopr Dialector) RollbackTo(tx *gorm.DB, name string) error
- func (dialectopr Dialector) SavePoint(tx *gorm.DB, name string) error
- type Migrator
Constants ¶
View Source
const DriverName = "sqlite3"
DriverName is the default driver name for SQLite.
Variables ¶
View Source
var ( // ErrRecordNotFound - Record not found error ErrRecordNotFound = gorm.ErrRecordNotFound Client *gorm.DB )
Client - Database Client
Functions ¶
func AddCertificate ¶ added in v0.0.2
AddCertificate add a certificate to the database
func AddContent ¶
func AddContent(pbWebContent *lispb.WebContent, webContentDir string) (*lispb.WebContent, error)
AddContent - Add content to website
func AddWebSite ¶
AddWebsite - Return website, create if it does not exist
func CreatePipeline ¶ added in v0.0.2
func FindAliveSessions ¶
func FindAliveSessions() ([]*lispb.RegisterSession, error)
func FindAllSessions ¶
func FindPipeline ¶ added in v0.0.2
func FindSession ¶
func FindSession(sessionID string) (*lispb.RegisterSession, error)
func FindTaskAndMaxTasksID ¶
func GetTaskDescriptionByID ¶
func GetTaskDescriptionByID(taskID string) (*models.FileDescription, error)
func HasOperator ¶ added in v0.0.2
func ListClients ¶ added in v0.0.2
func ListListeners ¶
func ListPipelines ¶ added in v0.0.2
func RemoveContent ¶
func RemoveWebAllContent ¶
func RemoveWebSite ¶
func SaveCertificate ¶
func SaveCertificate(certificate *models.Certificate) error
func UpdateLast ¶
func UpdateSession ¶
func UpdateSessionInfo ¶
func UpdateSessionStatus ¶
func UpdateSessionStatus() error
func WebContentByIDAndPath ¶
func WebContentByIDAndPath(id string, path string, webContentDir string, eager bool) (*lispb.WebContent, error)
WebContent by ID and path
func WebsiteByName ¶
website WebsiteByName - Get website by name
Types ¶
type Dialector ¶
func (Dialector) ClauseBuilders ¶
func (dialector Dialector) ClauseBuilders() map[string]clause.ClauseBuilder
func (Dialector) DefaultValueOf ¶
func (dialector Dialector) DefaultValueOf(field *schema.Field) clause.Expression
func (Dialector) RollbackTo ¶
Click to show internal directories.
Click to hide internal directories.