Documentation ¶
Index ¶
- Constants
- type SecurityContext
- func (s *SecurityContext) Can(ctx context.Context, action types.Action, resource types.Resource) bool
- func (s *SecurityContext) GetUsername() string
- func (s *SecurityContext) IsAuthenticated() bool
- func (s *SecurityContext) IsSolutionUser() bool
- func (s *SecurityContext) IsSysAdmin() bool
- func (s *SecurityContext) Name() string
Constants ¶
View Source
const (
// contains "#" to avoid the conflict with normal user
ProxyCacheService = "harbor#proxy-cache-service"
)
const definition
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type SecurityContext ¶
type SecurityContext struct {
// contains filtered or unexported fields
}
SecurityContext is the security context for proxy cache secret
func NewSecurityContext ¶
func NewSecurityContext(repository string) *SecurityContext
NewSecurityContext returns an instance of the proxy cache secret security context
func (*SecurityContext) Can ¶
func (s *SecurityContext) Can(ctx context.Context, action types.Action, resource types.Resource) bool
Can returns true only when requesting pull/push operation against the specific project
func (*SecurityContext) GetUsername ¶
func (s *SecurityContext) GetUsername() string
GetUsername returns the name of proxy cache service
func (*SecurityContext) IsAuthenticated ¶
func (s *SecurityContext) IsAuthenticated() bool
IsAuthenticated always returns true
func (*SecurityContext) IsSolutionUser ¶
func (s *SecurityContext) IsSolutionUser() bool
IsSolutionUser always returns false
func (*SecurityContext) IsSysAdmin ¶
func (s *SecurityContext) IsSysAdmin() bool
IsSysAdmin always returns false
func (*SecurityContext) Name ¶
func (s *SecurityContext) Name() string
Name returns the name of the security context
Click to show internal directories.
Click to hide internal directories.