Documentation ¶
Index ¶
- Constants
- Variables
- func AddCertificate(caType int, keyType string, commonName string, cert []byte, key []byte) error
- func AddContent(pbWebContent *clientpb.WebContent, webContentDir string) (*clientpb.WebContent, error)
- func AddFile(typ string, taskpb *clientpb.Task, td *models.FileDescription) error
- func AddTask(task *clientpb.Task) error
- func AddWebsite(webSiteName string, webContentDir string) (*clientpb.Website, error)
- func CreateOperator(name string, typ string, remoteAddr string) error
- func CreatePipeline(pipeline *models.Pipeline) error
- func DeleteAllCertificates() error
- func DeleteCertificate(name string) error
- func DeleteSession(sessionID string) error
- func DisablePipeline(pipeline models.Pipeline) error
- func EnablePipeline(pipeline models.Pipeline) error
- func FindAliveSessions() ([]*clientpb.Session, error)
- func FindAllSessions() (*clientpb.Sessions, error)
- func FindFilesWithNonOneCurTotal(session models.Session) ([]models.File, error)
- func FindPipeline(name string) (models.Pipeline, error)
- func FindPipelineCert(pipelineName, listenerID string) (string, string, error)
- func FindSession(sessionID string) (*clientpb.Session, error)
- func FindTaskAndMaxTasksID(sessionID string) ([]*models.Task, uint32, error)
- func GetAllFiles(sessionID string) ([]models.File, error)
- func GetAllTask() (*clientpb.Tasks, error)
- func GetArtifactById(id uint32) (*models.Builder, error)
- func GetArtifactByName(name string) (*models.Builder, error)
- func GetArtifacts() (*clientpb.Builders, error)
- func GetBuilderLogs(builderName string, limit int) (string, error)
- func GetProfile(name string) (*types.ProfileConfig, error)
- func GetProfiles() ([]models.Profile, error)
- func GetTaskDescriptionByID(taskID string) (*models.FileDescription, error)
- func GetTaskPB(taskID string) (*clientpb.Task, error)
- func HasOperator(typ string) (bool, error)
- func ListClients() ([]models.Operator, error)
- func ListListeners() ([]models.Operator, error)
- func ListPipelines(listenerID string) ([]models.Pipeline, error)
- func ListWebsite(listenerID string) ([]models.Pipeline, error)
- func NewDBClient() *gorm.DB
- func NewProfile(profile *clientpb.Profile) error
- func Open(dsn string) gorm.Dialector
- func RemoveContent(id string) error
- func RemoveWebsite(id string) error
- func RemoveWebsiteContent(id string) error
- func SaveArtifact(name, artifactType, platform, arch, stage string) (*models.Builder, error)
- func SaveArtifactFromGenerate(req *clientpb.Generate) (*models.Builder, error)
- func SaveCertificate(certificate *models.Certificate) error
- func Session() *gorm.DB
- func UpdateBuilder(builder *models.Builder) error
- func UpdateBuilderLog(name string, logEntry string)
- func UpdateDownloadTotal(task *clientpb.Task, total int) error
- func UpdateFileByID(ID string, newCur int) error
- func UpdateGeneratorConfig(req *clientpb.Generate, path string, config *types.ProfileConfig) error
- func UpdateLast(sessionID string) error
- func UpdateSession(sessionID, note, group string) error
- func UpdateTask(task *clientpb.Task) error
- func UpdateTaskDescription(taskID, Description string) error
- func WebContentByIDAndPath(id string, path string, webContentDir string, eager bool) (*clientpb.WebContent, error)
- func WebsiteByName(name string, webContentDir string) (*clientpb.Website, error)
- func Websites(webContentDir string) ([]*clientpb.Website, error)
- func WebsitesAllByname(name, webContentDir string) ([]*clientpb.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 *clientpb.WebContent, webContentDir string) (*clientpb.WebContent, error)
AddContent - Add content to website
func AddWebsite ¶ added in v0.0.3
AddWebsite - Return website, create if it does not exist
func CreatePipeline ¶ added in v0.0.2
func DisablePipeline ¶ added in v0.0.3
func EnablePipeline ¶ added in v0.0.3
func FindAliveSessions ¶
func FindAllSessions ¶
func FindFilesWithNonOneCurTotal ¶ added in v0.0.3
func FindPipelineCert ¶ added in v0.0.3
func FindTaskAndMaxTasksID ¶
func GetAllTask ¶ added in v0.0.3
func GetArtifactByName ¶ added in v0.0.3
func GetArtifacts ¶ added in v0.0.3
func GetBuilderLogs ¶ added in v0.0.3
func GetProfile ¶ added in v0.0.3
func GetProfile(name string) (*types.ProfileConfig, error)
func GetProfiles ¶ added in v0.0.3
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 RemoveWebsite ¶ added in v0.0.3
RemoveWebsite - Remove website by ID
func RemoveWebsiteContent ¶ added in v0.0.3
RemoveWebsiteContent - Remove all content of a website by ID
func SaveArtifact ¶ added in v0.0.3
func SaveArtifactFromGenerate ¶ added in v0.0.3
func SaveCertificate ¶
func SaveCertificate(certificate *models.Certificate) error
func UpdateBuilder ¶ added in v0.0.3
func UpdateBuilderLog ¶ added in v0.0.3
func UpdateDownloadTotal ¶ added in v0.0.3
func UpdateFileByID ¶ added in v0.0.3
func UpdateGeneratorConfig ¶ added in v0.0.3
UpdateGeneratorConfig - Update the generator config
func UpdateLast ¶
func UpdateSession ¶
func UpdateTask ¶
func UpdateTaskDescription ¶ added in v0.0.3
func WebContentByIDAndPath ¶
func WebContentByIDAndPath(id string, path string, webContentDir string, eager bool) (*clientpb.WebContent, error)
WebContent by ID and path
func WebsiteByName ¶
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.