model

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 31, 2026 License: GPL-3.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameBuild = "build"
View Source
const TableNameForgejoAuth = "forgejo_auth"
View Source
const TableNameRepoInstallation = "repo_installation"

Variables

This section is empty.

Functions

func Decrypt

func Decrypt(ciphertext string) (string, error)

func Encrypt

func Encrypt(plaintext string) (string, error)

func InitEncryption

func InitEncryption(encryptionKey string) error

Types

type Build

type Build struct {
	ID            int32     `gorm:"column:id;primaryKey" json:"id"`
	WebhookID     int32     `gorm:"column:webhook_id;not null" json:"webhook_id"`
	ForgejoAuthID int32     `gorm:"column:forgejo_auth_id;not null" json:"forgejo_auth_id"`
	CirrusBuildID string    `gorm:"column:cirrus_build_id;not null" json:"cirrus_build_id"`
	BuildStatus   string    `gorm:"column:build_status;not null" json:"build_status"`
	CommitHash    string    `gorm:"column:commit_hash;not null" json:"commit_hash"`
	CreatedAt     time.Time `gorm:"column:created_at;not null" json:"created_at"`
	UpdatedAt     time.Time `gorm:"column:updated_at;not null" json:"updated_at"`
}

Build mapped from table <build>

func (*Build) TableName

func (*Build) TableName() string

TableName Build's table name

type ForgejoAuth

type ForgejoAuth struct {
	ID           int32     `gorm:"column:id;primaryKey" json:"id"`
	AccessToken  string    `gorm:"column:access_token;not null" json:"access_token"`
	RefreshToken string    `gorm:"column:refresh_token;not null" json:"refresh_token"`
	CreatedAt    time.Time `gorm:"column:created_at;not null" json:"created_at"`
	ExpiresAt    time.Time `gorm:"column:expires_at;not null" json:"expires_at"`
	Username     string    `gorm:"column:username;not null" json:"username"`
	Issuer       string    `gorm:"column:issuer;not null" json:"issuer"`
	CirrusAPIKey string    `gorm:"column:cirrus_api_key;not null" json:"cirrus_api_key"`
	GhRepoName   string    `gorm:"column:gh_repo_name;not null" json:"gh_repo_name"`
	GhOwnerName  string    `gorm:"column:gh_owner_name;not null" json:"gh_owner_name"`
}

ForgejoAuth mapped from table <forgejo_auth>

func (*ForgejoAuth) AfterFind

func (f *ForgejoAuth) AfterFind(tx *gorm.DB) error

func (*ForgejoAuth) BeforeSave

func (f *ForgejoAuth) BeforeSave(tx *gorm.DB) error

func (*ForgejoAuth) TableName

func (*ForgejoAuth) TableName() string

TableName ForgejoAuth's table name

type RepoInstallation

type RepoInstallation struct {
	ID            int32  `gorm:"column:id;primaryKey" json:"id"`
	WebhookToken  string `gorm:"column:webhook_token;not null" json:"webhook_token"`
	Secret        string `gorm:"column:secret;not null" json:"secret"`
	RepoName      string `gorm:"column:repo_name;not null" json:"repo_name"`
	OwnerName     string `gorm:"column:owner_name;not null" json:"owner_name"`
	ForgejoAuthID int32  `gorm:"column:forgejo_auth_id;not null" json:"forgejo_auth_id"`
}

RepoInstallation mapped from table <repo_installation>

func (*RepoInstallation) TableName

func (*RepoInstallation) TableName() string

TableName RepoInstallation's table name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL