Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewContext ¶
func NewContext(ctx context.Context, identity *DockerIdentity) context.Context
NewContext returns a new Context that carries value identity.
Types ¶
type DockerIdentity ¶
type DockerIdentity struct { DockerID string Username string FullName string Email string Scopes []string }
DockerIdentity identifies a Docker user.
func FromContext ¶
func FromContext(ctx context.Context) (*DockerIdentity, bool)
FromContext returns the DockerIdentity value stored in ctx, if any.
func (DockerIdentity) HasScope ¶
func (di DockerIdentity) HasScope(scope string) bool
HasScope returns true if the exact input scope is present in the scopes list.
func (DockerIdentity) String ¶
func (di DockerIdentity) String() string
Click to show internal directories.
Click to hide internal directories.