Versions in this module Expand all Collapse all v0 v0.4.7 Oct 20, 2021 Changes in this version + const ConfigFile + const DEBUG + const FAIL + const INFO + const WARN + var BuildTime string = "" + var Compiler string = "" + var Console lwrapper + var GitHash string = "" + var LogFileEnable bool = false + var LogStderrEnable bool = false + var LogStdoutEnable bool = true + var Version string = "development" + func ConfigWrite(cfg *Config, filename string) error + func DBConnect(cfg *Config) (*gorm.DB, error) + func GenericJSONDecode(rd io.Reader, pl interface{}) error + func LogClose() + type AuthProvider struct + Extra string + ID uint + Name string + Type string + User User + UserId uint + type Build struct + Api string + ApiUrl string + Branch string + BuildScript BuildScript + BuildScriptID uint + CommitAuthor string + CommitMessage string + CommitSha string + CommitUrl string + CreatedAt time.Time + Duration string + Event string + FinishedAt time.Time + ID uint + Log string + Repository Repository + RepositoryID uint + StartedAt time.Time + Status string + UpdatedAt time.Time + Zip string + type BuildScript struct + CreatedAt time.Time + EventType string + ID uint + Repository Repository + RepositoryID uint + ShellScript string + UpdatedAt time.Time + type Config struct + Api ConfigApi + AppTitle string + Auth ConfigAuth + Author ConfigAuthor + Build ConfigBuild + CompressionMethod string + Database ConfigDatabase + Debug bool + Directory ConfigDirectory + GiteaApi ConfigOauth + HttpHost string + HttpPort int + Install bool + LogFile string + LogFileEnable bool + LogMode string + LogServer string + LoginTokenDuration int + LoginTokenInvalidate bool + ParallelBuilds int + PublicEnable bool + RepoSecretShow bool + WebHookLog bool + func ConfigDefault() Config + func ConfigRead(filename string) (Config, error) + func (cfg Config) Reflect(q string) string + type ConfigApi struct + Enable bool + ListingEnable bool + ListingNeedsAuth bool + type ConfigAuth struct + NativeEnable bool + TOTPEnable bool + type ConfigAuthor struct + City string + Email string + Name string + Privacy string + Street string + Zip string + type ConfigBuild struct + RefreshInterval int + RefreshPage bool + type ConfigDatabase struct + Dbname string + Filename string + Host string + Password string + Port int + PostgresSSL string + Provider string + Username string + type ConfigDirectory struct + Build string + Repo string + type ConfigOauth struct + OauthClientId string + OauthClientSecret string + type Group struct + User []*User + type LogWrapper interface + Debug func(...interface{}) + Debugf func(string, ...interface{}) + Fail func(...interface{}) + Failf func(string, ...interface{}) + Log func(...interface{}) + Logf func(string, ...interface{}) + Warn func(...interface{}) + Warnf func(string, ...interface{}) + func LogInit(lf string) (LogWrapper, error) + type LoginToken struct + CreatedAt time.Time + ExpiresAt time.Time + ID uint + Name string + Secret string + Step string + StepExtra string + Type string + User User + UserID uint + type OauthToken struct + Api string + ClientId string + ClientSecret string + ClientToken string + CreatedAt time.Time + ID uint + Name string + RedirectUri string + State string + UpdatedAt time.Time + Url string + UserID uint + type Repository struct + BuildCount uint + BuildScript string + BuildScripts []BuildScript + CloneUrl string + CreatedAt time.Time + DefaultBranch string + ID uint + KeepBuilds bool + LocalBuildEnable bool + Name string + Public bool + Secret string + UpdatedAt time.Time + User User + UserID uint + WebHookEnable bool + type ServerLogger struct + func ServerLoggerNew(logfile string) (*ServerLogger, error) + func (s ServerLogger) Close() + func (s ServerLogger) Write(p []byte) (n int, err error) + type Thread uintptr + func Pthread_create(cb ThreadCallback) Thread + func (t Thread) Pthread_join() + func (t Thread) Pthread_kill() + func (t Thread) Running() bool + type ThreadCallback func() + type User struct + AuthExtra string + AuthProvider string + AuthProviderExtra string + CreatedAt time.Time + Email string + Group []*Group + ID uint + Name string + Passhash string + Superuser bool + UpdatedAt time.Time + func (u *User) Reset() + type WebHookLog struct + API string + Build Build + BuildID uint + CreatedAt time.Time + ID uint + Repository Repository + RepositoryID uint + Request string + ResponseBody string + ResponseStatus int + Status string