Documentation
¶
Index ¶
- func ProtoFromDeploymentMsg(d *DeploymentMessage) *commonTypes.Deployment
- type AccessTokenMessage
- type ArtifactArrayMessage
- type ArtifactMessage
- type BranchConfig
- type BranchMessage
- type BuildArrayMessage
- type BuildMessage
- type BuildsQueryParams
- type CommitMessage
- type Config
- type CredentialsMessage
- type DeploymentArrayMessage
- type DeploymentMessage
- type GithubRepo
- type HeadMessage
- type ImageMessage
- type ManifestMessage
- type PGClientConfig
- type PaginationQueryParams
- type PullRequestMessage
- type RepoArrayMessage
- type RepoMessage
- type RepositoryMessage
- type RevisionArrayMessage
- type RevisionMessage
- type ScaleMessage
- type User
- type UserAdminMessage
- type UsersArrayMessage
- type WebhookMessage
- type WebhookSecretMessage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ProtoFromDeploymentMsg ¶
func ProtoFromDeploymentMsg(d *DeploymentMessage) *commonTypes.Deployment
Types ¶
type AccessTokenMessage ¶
type AccessTokenMessage struct {
Token string `json:"token"`
}
AccessTokenMessage is used for json binding
type ArtifactArrayMessage ¶
type ArtifactArrayMessage struct {
Total int64 `json:total"`
Artifacts []*ArtifactMessage `json:"artifacts"`
}
func ArtifactArrayMsgFromProto ¶
func ArtifactArrayMsgFromProto(a *commonTypes.ArtifactsArray) *ArtifactArrayMessage
type ArtifactMessage ¶
type ArtifactMessage struct {
ID int64 `json:"id"`
BuildID int64 `json:"buildID"`
Name string `json:"name"`
}
func ArtifactMsgFromProto ¶
func ArtifactMsgFromProto(a *commonTypes.BuildArtifact) *ArtifactMessage
type BranchConfig ¶
type BranchConfig struct {
ID int64 `json:"-"`
GithubRepoID int64 `json:"-" pg:",fk" sql:"on_delete:CASCADE"`
GithubRepo *GithubRepo `json:"-"`
Branch string `json:"branch"`
IsCiEnabled bool `json:"ciEnabled"`
}
BranchConfig sets CI configuration for specific branch of repo
type BranchMessage ¶
type BranchMessage struct {
BranchName string `json:"branch"`
}
BranchMessage is used for json binding
type BuildArrayMessage ¶
type BuildArrayMessage struct {
Total int64 `json:"total"`
Builds []*BuildMessage `json:"builds"`
}
func BuildArrayMsgFromProto ¶
func BuildArrayMsgFromProto(b *commonTypes.BuildsArray) (*BuildArrayMessage, error)
type BuildMessage ¶
type BuildMessage struct {
ID int64 `json:"id"`
GithubRepoID int64 `json:"repoID"`
IsSuccessfull bool `json:"isSuccessfull"`
Date time.Time `json:"date"`
Branch string `json:"branch"`
Stdout string `json:"stdout"`
}
func BuildMsgFromProto ¶
func BuildMsgFromProto(b *commonTypes.Build) (*BuildMessage, error)
type BuildsQueryParams ¶
type CommitMessage ¶
type CommitMessage struct {
SHA string `json:"id"`
}
type Config ¶
type Config struct {
// Port to listen for requests
Port int
DBAddr string
DB string
DBUser string
DBPassword string
AdminLogin string
AdminPassword string
JWTSecret string
RabbitAddress string
CIAddress string
CDAddress string
}
Config represents configuration for application
type CredentialsMessage ¶
CredentialsMessage is used for json binding
type DeploymentArrayMessage ¶
type DeploymentArrayMessage struct {
Total int64 `json:"total"`
Deployments []*DeploymentMessage `json:"deployments"`
}
func DeploymentArrayMsgFromProto ¶
func DeploymentArrayMsgFromProto(d *commonTypes.DeploymentsArray) (*DeploymentArrayMessage, error)
type DeploymentMessage ¶
type DeploymentMessage struct {
ID int64 `json:"ID"`
Branch string `json:"branch"`
RepoID int64 `json:"repoID"`
ArtifactID int64 `json:"artifactID"`
K8SName string `json:"k8sName"`
Manifest string `json:"manifest"`
Replicas int64 `json:"replicas"`
}
func DeploymentMsgFromProto ¶
func DeploymentMsgFromProto(kd *commonTypes.Deployment) *DeploymentMessage
type GithubRepo ¶
type GithubRepo struct {
ID int64 `json:"repoID"`
FullName string `json:"fullName" sql:",unique"`
UserID int64 `json:"-" pg:",fk" sql:"on_delete:CASCADE"`
User *User `json:"-"`
}
GithubRepo represents GitHub repository
type HeadMessage ¶
type ImageMessage ¶
type ImageMessage struct {
ImageID int64 `json:"imageID"`
}
type ManifestMessage ¶
type ManifestMessage struct {
Manifest string `json:"Manifest"`
}
type PGClientConfig ¶
type PaginationQueryParams ¶
type PullRequestMessage ¶
type PullRequestMessage struct {
Head HeadMessage `json:"head"`
}
type RepoArrayMessage ¶
type RepoArrayMessage struct {
Total int64 `json:"total"`
Repos []GithubRepo `json:"repos"`
}
type RepoMessage ¶
RepoMessage is used for json binding
type RepositoryMessage ¶
type RevisionArrayMessage ¶
type RevisionArrayMessage struct {
Total int64 `json:"total"`
Revisions []*RevisionMessage `json:"revisions"`
}
func RevisionArrayMsgFromProto ¶
func RevisionArrayMsgFromProto(r *commonTypes.RevisionsArray) (*RevisionArrayMessage, error)
type RevisionMessage ¶
type RevisionMessage struct {
ID int64 `json:"ID"`
DeploymentID int64 `json:"deploymentID"`
ArtifactID int64 `json:"artifactID"`
Date time.Time `json:"date"`
Stdout string `json:"stdout"`
Replicas int64 `json:"replicas"`
}
func RevisionMsgFromProto ¶
func RevisionMsgFromProto(r *commonTypes.Revision) (*RevisionMessage, error)
type ScaleMessage ¶
type ScaleMessage struct {
Replicas int64 `json:"replicas"`
}
type User ¶
type User struct {
ID int64 `json:"id"`
Login string `sql:",unique" json:"login"`
Password string `json:"-"`
IsAdmin bool `json:"admin" sql:"default:false"`
WebhookSecret string `json:"-" sql:"default:''"`
AccessToken string `json:"-" sql:"default:''"`
}
User represents system's user
func (User) Authenticate ¶
Authenticate checks if provided password matches for this user
type UserAdminMessage ¶
type UserAdminMessage struct {
IsAdmin bool `json:"admin"`
}
type UsersArrayMessage ¶
type WebhookMessage ¶
type WebhookMessage struct {
Action string `json:"action"`
Repository RepositoryMessage `json:"repository"`
Ref string `json:"ref"`
PullRequest PullRequestMessage `json:"pull_request"`
HeadCommit CommitMessage `json:"head_commit"`
}
WebhookMessage is used for json binding of webhook payload
type WebhookSecretMessage ¶
type WebhookSecretMessage struct {
Secret string `json:"secret"`
}
WebhookSecretMessage is used for json binding
Click to show internal directories.
Click to hide internal directories.