Documentation ¶
Index ¶
Constants ¶
View Source
const ( //SYSADMIN system administrator SYSADMIN = 1 //PROJECTADMIN project administrator PROJECTADMIN = 2 //DEVELOPER developer DEVELOPER = 3 //GUEST guest GUEST = 4 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AccessLog ¶
type AccessLog struct { LogID int `orm:"column(log_id)" json:"LogId"` UserID int `orm:"column(user_id)" json:"UserId"` ProjectID int64 `orm:"column(project_id)" json:"ProjectId"` RepoName string `orm:"column(repo_name)"` GUID string `orm:"column(GUID)" json:"Guid"` Operation string `orm:"column(operation)"` OpTime time.Time `orm:"column(op_time)"` Username string Keywords string BeginTime time.Time BeginTimestamp int64 EndTime time.Time EndTimestamp int64 }
AccessLog holds information about logs which are used to record the actions that user take to the resourses.
type Event ¶
type Event struct { ID string `json:"Id"` TimeStamp time.Time Action string Target *Target Request *Request Actor *Actor }
Event holds the details of a event.
type Project ¶
type Project struct { ProjectID int64 `orm:"column(project_id)" json:"ProjectId"` OwnerID int `orm:"column(owner_id)" json:"OwnerId"` Name string `orm:"column(name)"` CreationTime time.Time `orm:"column(creation_time)"` CreationTimeStr string Deleted int `orm:"column(deleted)"` UserID int `json:"UserId"` OwnerName string Public int `orm:"column(public)"` //This field does not have correspondent column in DB, this is just for UI to disable button Togglable bool }
Project holds the details of a project.
type ProjectRole ¶
type ProjectRole struct { PrID int `orm:"column(pr_id)" json:"PrId"` ProjectID int64 `orm:"column(project_id)" json:"ProjectId"` RoleID int `orm:"column(role_id)" json:"RoleId"` }
ProjectRole holds information about the relationship of project and role.
type Repo ¶
type Repo struct {
Repositories []string `json:"repositories"`
}
Repo holds information about repositories.
type RepoItem ¶
type RepoItem struct { ID string `json:"Id"` Parent string `json:"Parent"` Created time.Time `json:"Created"` CreatedStr string `json:"CreatedStr"` DurationDays string `json:"Duration Days"` Author string `json:"Author"` Architecture string `json:"Architecture"` DockerVersion string `json:"Docker Version"` Os string `json:"OS"` }
RepoItem holds manifest of an image.
type Role ¶
type Role struct { RoleID int `json:"role_id" orm:"column(role_id)"` RoleCode string `json:"role_code" orm:"column(role_code)"` Name string `json:"role_name" orm:"column(name)"` }
Role holds the details of a role.
type User ¶
type User struct { UserID int `orm:"column(user_id)" json:"UserId"` Username string `orm:"column(username)"` Email string `orm:"column(email)"` Password string `orm:"column(password)"` Realname string `orm:"column(realname)"` Comment string `orm:"column(comment)"` Deleted int `orm:"column(deleted)"` Rolename string RoleID int `json:"RoleId"` RoleList []Role HasAdminRole int ResetUUID string `orm:"column(reset_uuid)" json:"ResetUuid"` Salt string `orm:"column(salt)"` }
User holds the details of a user.
type UserProjectRole ¶
type UserProjectRole struct { UprID int `orm:"column(upr_id)" json:"UprId"` UserID int `orm:"column(user_id)" json:"UserId"` PrID int64 `orm:"column(pr_id)" json:"PrId"` }
UserProjectRole holds information about relationship of user, project and role.
Click to show internal directories.
Click to hide internal directories.