Documentation ¶
Index ¶
Constants ¶
View Source
const ( ActionAll = Action("*") // action match any other actions ActionPull = Action("pull") // pull repository tag ActionPush = Action("push") // push repository tag // create, read, update, delete, list actions compatible with restful api methods ActionCreate = Action("create") ActionRead = Action("read") ActionUpdate = Action("update") ActionDelete = Action("delete") ActionList = Action("list") )
const action variables
View Source
const ( ResourceAll = Resource("*") // resource match any other resources ResourceConfiguration = Resource("configuration") // project configuration compatible for portal only ResourceHelmChart = Resource("helm-chart") ResourceHelmChartVersion = Resource("helm-chart-version") ResourceHelmChartVersionLabel = Resource("helm-chart-version-label") ResourceLabel = Resource("label") ResourceLabelResource = Resource("label-resource") ResourceLog = Resource("log") ResourceMember = Resource("member") ResourceMetadata = Resource("metadata") ResourceReplication = Resource("replication") // TODO remove ResourceReplicationJob = Resource("replication-job") // TODO remove ResourceReplicationExecution = Resource("replication-execution") ResourceReplicationTask = Resource("replication-task") ResourceRepository = Resource("repository") ResourceRepositoryLabel = Resource("repository-label") ResourceRepositoryTag = Resource("repository-tag") ResourceRepositoryTagLabel = Resource("repository-tag-label") ResourceRepositoryTagManifest = Resource("repository-tag-manifest") ResourceRepositoryTagScanJob = Resource("repository-tag-scan-job") ResourceRepositoryTagVulnerability = Resource("repository-tag-vulnerability") ResourceRobot = Resource("robot") ResourceSelf = Resource("") // subresource for self )
const resource variables
View Source
const ( // EffectAllow allow effect EffectAllow = Effect("allow") // EffectDeny deny effect EffectDeny = Effect("deny") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BaseUser ¶
type BaseUser struct{}
BaseUser the type implement User interface whose policies are empty
func (*BaseUser) GetPolicies ¶
GetPolicies returns policies of the user
func (*BaseUser) GetUserName ¶
GetUserName returns user identity
type Namespace ¶
type Namespace interface { // Kind returns the kind of namespace Kind() string // Resource returns new resource for subresources with the namespace Resource(subresources ...Resource) Resource // Identity returns identity attached with namespace Identity() interface{} // IsPublic returns true if namespace is public IsPublic() bool }
Namespace the namespace interface
func NewProjectNamespace ¶
NewProjectNamespace returns namespace for project
type Resource ¶
type Resource string
Resource the type of resource
func (Resource) GetNamespace ¶
GetNamespace returns namespace from resource
func (Resource) RelativeTo ¶
RelativeTo returns relative resource to other resource
func (Resource) Subresource ¶
Subresource returns subresource
Click to show internal directories.
Click to hide internal directories.