models

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: May 28, 2020 License: Apache-2.0 Imports: 1 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConfigureValue

type ConfigureValue struct {
	Value    interface{} `json:"value"`
	Editable bool        `json:"editable"`
}

type InitProject

type InitProject struct {
	ProjectName string              `json:"project_name"`
	Metadata    InitProjectMetadata `json:"metadata"`
}

type InitProjectMetadata added in v1.0.3

type InitProjectMetadata struct {
	Public string `json:"public"`
}

type InitUser

type InitUser struct {
	Username string `json:"username"`
	Email    string `json:"email"`
	Password string `json:"password"`
	Realname string `json:"realname"`
	Comment  string `json:"comment"`
}

type Label

type Label struct {
	ID           int64     `orm:"pk;auto;column(id)" json:"id"`
	Name         string    `orm:"column(name)" json:"name"`
	Description  string    `orm:"column(description)" json:"description"`
	Color        string    `orm:"column(color)" json:"color"`
	Level        string    `orm:"column(level)" json:"-"`
	Scope        string    `orm:"column(scope)" json:"scope"`
	ProjectID    int64     `orm:"column(project_id)" json:"project_id"`
	CreationTime time.Time `orm:"column(creation_time);auto_now_add" json:"creation_time"`
	UpdateTime   time.Time `orm:"column(update_time);auto_now" json:"update_time"`
	Deleted      bool      `orm:"column(deleted)" json:"deleted"`
}

type Project

type Project struct {
	ProjectID    int64             `orm:"pk;auto;column(project_id)" json:"project_id"`
	OwnerID      int               `orm:"column(owner_id)" json:"owner_id"`
	Name         string            `orm:"column(name)" json:"name"`
	CreationTime time.Time         `orm:"column(creation_time);auto_now_add" json:"creation_time"`
	UpdateTime   time.Time         `orm:"column(update_time);auto_now" json:"update_time"`
	Deleted      interface{}       `orm:"column(deleted)" json:"deleted"`
	OwnerName    string            `orm:"-" json:"owner_name"`
	Togglable    bool              `orm:"-" json:"togglable"`
	Role         int               `orm:"-" json:"current_user_role_id"`
	RepoCount    int64             `orm:"-" json:"repo_count"`
	ChartCount   uint64            `orm:"-" json:"chart_count"`
	Metadata     map[string]string `orm:"-" json:"metadata"`
}

func (*Project) IsDeleted

func (p *Project) IsDeleted() bool

type ProjectMember added in v1.0.3

type ProjectMember struct {
	Id         int    `json:"id"`
	ProjectId  int    `json:"project_id"`
	EntityName string `json:"entity_name"`
	RoleName   string `json:"role_name"`
	RoleId     int    `json:"role_id"`
	EntityId   int    `json:"entity_id"`
	EntityType string `json:"entity_type"`
}

type ProjectMembers added in v1.0.3

type ProjectMembers struct {
	ProjectMemberEntity []ProjectMember
}

type Repo

type Repo struct {
	ID           int64     `json:"id"`
	Name         string    `json:"name"`
	ProjectID    int64     `json:"project_id"`
	Description  string    `json:"description"`
	PullCount    int64     `json:"pull_count"`
	StarCount    int64     `json:"star_count"`
	TagsCount    int64     `json:"tags_count"`
	Labels       []*Label  `json:"labels"`
	CreationTime time.Time `json:"creation_time"`
	UpdateTime   time.Time `json:"update_time"`
}

type SearchRepository

type SearchRepository struct {

	// The ID of the project that the repository belongs to
	ProjectId int32 `json:"project_id,omitempty"`

	// The name of the project that the repository belongs to
	ProjectName string `json:"project_name,omitempty"`

	// The flag to indicate the publicity of the project that the repository belongs to
	ProjectPublic interface{} `json:"project_public,omitempty"`

	// The name of the repository
	RepositoryName string `json:"repository_name,omitempty"`

	// The count of pull
	PullCount int64 `json:"pull_count,omitempty"`

	// The count of tag
	TagsCount int `json:"tags_count,omitempty"`
}

func (*SearchRepository) IsProjectPublic

func (sr *SearchRepository) IsProjectPublic() bool

type SearchResult

type SearchResult struct {
	Projects    []*Project          `json:"project"`
	Repositorys []*SearchRepository `json:"repository"`
}

type SearchUser added in v1.0.6

type SearchUser struct {
	Username string `json:"username"`
	UserId   int    `json:"user_id"`
}

type TagConfig

type TagConfig struct {
	Labels map[string]string `json:"labels"`
}

type TagDetail

type TagDetail struct {
	Digest        string     `json:"digest"`
	Name          string     `json:"name"`
	Size          int64      `json:"size"`
	Architecture  string     `json:"architecture"`
	OS            string     `json:"os"`
	DockerVersion string     `json:"docker_version"`
	Author        string     `json:"author"`
	Created       time.Time  `json:"created"`
	Config        *TagConfig `json:"config"`
}

type Users

type Users struct {
	UserId       int    `json:"user_id"`
	Username     string `json:"username"`
	Email        string `json:"email"`
	Password     string `json:"password"`
	Realname     string `json:"realname"`
	Comment      string `json:"comment"`
	Deleted      bool   `json:"deleted"`
	RoleName     string `json:"role_name"`
	RoleId       int    `json:"role_id"`
	HasAdminRole bool   `json:"has_admin_role"`
	ResetUuid    string `json:"reset_uuid"`
	Salt         string `json:"Salt"`
	CreationTime string `json:"creation_time"`
	UpdateTime   string `json:"update_time"`
}

Jump to

Keyboard shortcuts

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