test

package
v1.27.0-blob-service.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 16, 2018 License: BSD-2-Clause Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	EnsureAuthorizedServiceInvocations int
	EnsureAuthorizedServiceInputs      []context.Context
	EnsureAuthorizedServiceStub        func(ctx context.Context) error
	EnsureAuthorizedServiceOutputs     []error
	EnsureAuthorizedServiceOutput      *error
	EnsureAuthorizedUserInvocations    int
	EnsureAuthorizedUserInputs         []EnsureAuthorizedUserInput
	EnsureAuthorizedUserStub           func(ctx context.Context, targetUserID string, permission string) (string, error)
	EnsureAuthorizedUserOutputs        []EnsureAuthorizedUserOutput
	EnsureAuthorizedUserOutput         *EnsureAuthorizedUserOutput
	GetUserPermissionsInvocations      int
	GetUserPermissionsInputs           []GetUserPermissionsInput
	GetUserPermissionsStub             func(ctx context.Context, requestUserID string, targetUserID string) (user.Permissions, error)
	GetUserPermissionsOutputs          []GetUserPermissionsOutput
	GetUserPermissionsOutput           *GetUserPermissionsOutput
}

func NewClient

func NewClient() *Client

func (*Client) AssertOutputsEmpty added in v1.27.0

func (r *Client) AssertOutputsEmpty()

func (*Client) EnsureAuthorizedService added in v1.27.0

func (r *Client) EnsureAuthorizedService(ctx context.Context) error

func (*Client) EnsureAuthorizedUser added in v1.27.0

func (r *Client) EnsureAuthorizedUser(ctx context.Context, targetUserID string, permission string) (string, error)

func (*Client) GetUserPermissions

func (r *Client) GetUserPermissions(ctx context.Context, requestUserID string, targetUserID string) (user.Permissions, error)

type EnsureAuthorizedUserInput added in v1.27.0

type EnsureAuthorizedUserInput struct {
	Context      context.Context
	TargetUserID string
	Permission   string
}

type EnsureAuthorizedUserOutput added in v1.27.0

type EnsureAuthorizedUserOutput struct {
	AuthorizedUserID string
	Error            error
}

type GetUserPermissionsInput

type GetUserPermissionsInput struct {
	Context       context.Context
	RequestUserID string
	TargetUserID  string
}

type GetUserPermissionsOutput

type GetUserPermissionsOutput struct {
	Permissions user.Permissions
	Error       error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL