Documentation ¶
Index ¶
- Variables
- func NewErrorFromStatus(s *status.Status) error
- type Action
- type Actor
- type Client
- func (c *Client) AssignRole(ctx context.Context, roleName string, actor Actor) error
- func (c *Client) AssignRoleToGroup(ctx context.Context, roleName string, group Group) error
- func (c *Client) Close() error
- func (c *Client) CreateRole(ctx context.Context, name string, permissions ...Permission) (Role, error)
- func (c *Client) DeleteRole(ctx context.Context, name string) error
- func (c *Client) HasPermission(ctx context.Context, actor Actor, action, resource string) (bool, error)
- func (c *Client) ListResourcePatterns(ctx context.Context, actor Actor, action string) ([]string, error)
- func (c *Client) UnassignRole(ctx context.Context, roleName string, actor Actor) error
- func (c *Client) UnassignRoleFromGroup(ctx context.Context, roleName string, group Group) error
- type DialOption
- type ErrAlreadyExists
- type ErrNotFound
- type Group
- type Permission
- type Role
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrFailedToConnect = errors.New("perm: failed to connect") ErrUnauthenticated = errors.New("perm: unauthenticated") ErrNoTransportSecurity = errors.New("perm: no transport security set (use perm.WithTLSConfig() to set)") ErrClientConnClosing = errors.New("perm: the client connection is already closing or closed") ErrRoleNotFound = NewErrNotFound("role") ErrRoleAlreadyExists = NewErrAlreadyExists("role") ErrAssignmentNotFound = NewErrNotFound("assignment") ErrAssignmentAlreadyExists = NewErrAlreadyExists("assignment") )
Functions ¶
func NewErrorFromStatus ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) AssignRole ¶
func (*Client) AssignRoleToGroup ¶
func (*Client) CreateRole ¶
func (*Client) HasPermission ¶
func (*Client) ListResourcePatterns ¶
func (*Client) UnassignRole ¶
type DialOption ¶
type DialOption func(*options)
func WithTLSConfig ¶
func WithTLSConfig(config *tls.Config) DialOption
func WithTokenSource ¶
func WithTokenSource(tokenSource oauth2.TokenSource) DialOption
type ErrAlreadyExists ¶
type ErrAlreadyExists struct {
// contains filtered or unexported fields
}
func NewErrAlreadyExists ¶
func NewErrAlreadyExists(model string) ErrAlreadyExists
func (ErrAlreadyExists) Error ¶
func (err ErrAlreadyExists) Error() string
type ErrNotFound ¶
type ErrNotFound struct {
// contains filtered or unexported fields
}
func NewErrNotFound ¶
func NewErrNotFound(model string) ErrNotFound
func (ErrNotFound) Error ¶
func (err ErrNotFound) Error() string
type Permission ¶
Directories ¶
Path | Synopsis |
---|---|
internal/repos/reposfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
internal/ioutilx/ioutilxfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
internal
|
|
logxfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
monitorfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
recording/recordingfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
oidcxfakes
Code generated by counterfeiter.
|
Code generated by counterfeiter. |
Click to show internal directories.
Click to hide internal directories.