Initial Commit
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2022-06-27 21:42:59 +02:00
commit daf58bb4ca
30 changed files with 3040 additions and 0 deletions

7
pkg/domain/author.go Normal file
View File

@ -0,0 +1,7 @@
package domain
type Author struct {
Avatar string
Email string
Name string
}

33
pkg/domain/build.go Normal file
View File

@ -0,0 +1,33 @@
package domain
import "time"
type Build struct {
Created int64
Event string
Finished int64
Link string
Number int
Started int64
Status string
}
func (b *Build) CreatedToTimeFormat(format string) string {
return time.Unix(b.Created, 0).Format(format)
}
func (b *Build) FinishedToTimeFormat(format string) string {
return time.Unix(b.Finished, 0).Format(format)
}
func (b *Build) IsEvent(expectedEvent string) bool {
return expectedEvent == b.Event
}
func (b *Build) IsStatus(expectedStatus string) bool {
return expectedStatus == b.Status
}
func (b *Build) StartedToTimeFormat(format string) string {
return time.Unix(b.Started, 0).Format(format)
}

10
pkg/domain/commit.go Normal file
View File

@ -0,0 +1,10 @@
package domain
type Commit struct {
Author *Author
Branch string
Link string
Message string
Ref string
Sha string
}

8
pkg/domain/job.go Normal file
View File

@ -0,0 +1,8 @@
package domain
type Job struct {
ExitCode int
Finished int64
Started int64
Status string
}

6
pkg/domain/prev.go Normal file
View File

@ -0,0 +1,6 @@
package domain
type Prev struct {
Build *PrevBuild
Commit *PrevCommit
}

6
pkg/domain/prevBuild.go Normal file
View File

@ -0,0 +1,6 @@
package domain
type PrevBuild struct {
Number int
Status string
}

5
pkg/domain/prevCommit.go Normal file
View File

@ -0,0 +1,5 @@
package domain
type PrevCommit struct {
Sha string
}

5
pkg/domain/remote.go Normal file
View File

@ -0,0 +1,5 @@
package domain
type Remote struct {
URL string
}

13
pkg/domain/repo.go Normal file
View File

@ -0,0 +1,13 @@
package domain
type Repo struct {
Avatar string
Branch string
FullName string
Link string
Name string
Owner string
Private bool
SCM string
Trusted bool
}

13
pkg/domain/smtp.go Normal file
View File

@ -0,0 +1,13 @@
package domain
type SMTPSettings struct {
FromAddress string
FromName string
HELOName string
Host string
Password string
Port int
StartTLS bool
TLSInsecureSkipVerify bool
Username string
}

6
pkg/domain/yaml.go Normal file
View File

@ -0,0 +1,6 @@
package domain
type Yaml struct {
Signed bool
Verified bool
}