models

package
v1.4.14 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AccountTypes = struct {
	Gitlab AccountType
}{
	Gitlab: "Gitlab",
}

Functions

This section is empty.

Types

type Account

type Account struct {
	Id           Id          `json:"id"`
	UserId       Id          `json:"user_id`
	AccountType  AccountType `json:"account_type"`
	AccessToken  string      `json:"access_token"`
	TokenType    string      `json:"token_type"`
	RefreshToken string      `json:"refresh_token"`
	CreatedUpdated
}

type AccountType

type AccountType string

type Application

type Application struct {
	Id          Id                 `json:"id"`
	Name        string             `json:"name"`
	Description string             `json:"description"`
	Href        string             `json:"href"`
	IconName    string             `json:"icon" gorm:"column:icon"`
	UseProjects bool               `json:"use_projects"`
	IsInBeta    bool               `json:"is_in_beta"`
	IsDisabled  bool               `json:"is_disabled"`
	Config      *ApplicationConfig `json:"config"`
}

type ApplicationConfig added in v1.4.10

type ApplicationConfig struct {
	Sections []ApplicationSection `json:"sections"`
}

func (*ApplicationConfig) Scan added in v1.4.10

func (c *ApplicationConfig) Scan(value interface{}) error

func (ApplicationConfig) Value added in v1.4.10

func (c ApplicationConfig) Value() (driver.Value, error)

type ApplicationSection added in v1.4.10

type ApplicationSection struct {
	Name string `json:"name"`
	Href string `json:"href"`
}

func (*ApplicationSection) Scan added in v1.4.10

func (c *ApplicationSection) Scan(value interface{}) error

func (ApplicationSection) Value added in v1.4.10

func (c ApplicationSection) Value() (driver.Value, error)

type CreatedUpdated

type CreatedUpdated struct {
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

type Id

type Id int

func ParseId

func ParseId(id string) (Id, error)

func (Id) String

func (id Id) String() string

type Label

type Label struct {
	Key   string `json:"key"`
	Value string `json:"value"`
}

type Labels

type Labels []Label

func (*Labels) Scan

func (labels *Labels) Scan(value interface{}) error

func (Labels) Value

func (labels Labels) Value() (driver.Value, error)

type Project

type Project struct {
	Id                Id             `json:"id"`
	Name              string         `json:"name" validate:"required,min=3,max=50,subdomain_rfc1123"`
	MlflowTrackingUrl string         `json:"mlflow_tracking_url" validate:"omitempty,url"`
	Administrators    pq.StringArray `json:"administrators" gorm:"administrators;type:varchar(256)[]"`
	Readers           pq.StringArray `json:"readers" gorm:"readers;type:varchar(256)[]"`
	Team              string         `json:"team" validate:"required,min=1,max=64"`
	Stream            string         `json:"stream" validate:"required,min=1,max=64"`
	Labels            Labels         `json:"labels,omitempty" gorm:"column:labels"`
	CreatedUpdated
}

type Secret

type Secret struct {
	Id        Id     `json:"id"`
	ProjectId Id     `json:"project_id"`
	Name      string `json:"name"`
	Data      string `json:"data"`
	CreatedUpdated
}

func (*Secret) CopyValueFrom

func (s *Secret) CopyValueFrom(secret *Secret)

func (*Secret) DecryptData

func (s *Secret) DecryptData(passphrase string) (*Secret, error)

func (*Secret) EncryptData

func (s *Secret) EncryptData(passphrase string) (*Secret, error)

func (*Secret) IsValidForInsertion

func (s *Secret) IsValidForInsertion() bool

func (*Secret) IsValidForMutation

func (s *Secret) IsValidForMutation() bool

type User

type User struct {
	Id       Id     `json:"-"`
	Username string `json:"username"`
	Email    string `json:"email"`
	CreatedUpdated
}

Jump to

Keyboard shortcuts

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