mock

package
v1.33.0 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v1.33.0

type Client struct {
	mock.Mock
}

func Create

func Create() *Client

func (*Client) AddAction added in v1.33.0

func (mock *Client) AddAction(action grpcapi.Action) error

func (*Client) AddActionWithContext added in v1.33.0

func (mock *Client) AddActionWithContext(ctx context.Context, action grpcapi.Action) error

func (*Client) AddResource added in v1.33.0

func (mock *Client) AddResource(resource common.Origin) error

func (*Client) AddResourceRelation added in v1.33.0

func (mock *Client) AddResourceRelation(resource common.Origin, parent common.Origin) error

func (*Client) AddResourceRelationWithContext added in v1.33.0

func (mock *Client) AddResourceRelationWithContext(ctx context.Context, resource common.Origin, parent common.Origin) error

func (*Client) AddResourceRelations added in v1.33.0

func (mock *Client) AddResourceRelations(resources grpcapi.AddResourceRelationsInput) error

func (*Client) AddResourceRelationsWithContext added in v1.33.0

func (mock *Client) AddResourceRelationsWithContext(ctx context.Context, resources grpcapi.AddResourceRelationsInput) error

func (*Client) AddResourceWithContext added in v1.33.0

func (mock *Client) AddResourceWithContext(ctx context.Context, resource common.Origin) error

func (*Client) AddResources added in v1.33.0

func (mock *Client) AddResources(resources []common.Origin) error

func (*Client) AddResourcesWithContext added in v1.33.0

func (mock *Client) AddResourcesWithContext(ctx context.Context, resources []common.Origin) error

func (*Client) AddUserRole added in v1.33.0

func (mock *Client) AddUserRole(role grpcapi.UserRole) error

func (*Client) AddUserRoleWithContext added in v1.33.0

func (mock *Client) AddUserRoleWithContext(ctx context.Context, role grpcapi.UserRole) error

func (*Client) ApplyUserAction added in v1.33.0

func (mock *Client) ApplyUserAction(userID, action string, resource *common.Origin) error

func (*Client) ApplyUserActionWithContext added in v1.33.0

func (mock *Client) ApplyUserActionWithContext(ctx context.Context, userID, action string, resource *common.Origin) error

func (*Client) Close added in v1.33.0

func (mock *Client) Close() error

func (*Client) DeepPing added in v1.33.0

func (mock *Client) DeepPing() error

func (*Client) DeepPingWithContext added in v1.33.0

func (mock *Client) DeepPingWithContext(ctx context.Context) error

func (*Client) Dial added in v1.33.0

func (mock *Client) Dial(host, port string, opts ...grpc.DialOption) error

func (*Client) DialUsingCredentials added in v1.33.0

func (mock *Client) DialUsingCredentials(sess *session.Session, host, port, secretKey string, opts ...grpc.DialOption) error

func (*Client) DialUsingCredentialsWithContext added in v1.33.0

func (mock *Client) DialUsingCredentialsWithContext(ctx context.Context, sess *session.Session, host, port, secretKey string, opts ...grpc.DialOption) error

func (*Client) DialWithContext added in v1.33.0

func (mock *Client) DialWithContext(ctx context.Context, host, port string, opts ...grpc.DialOption) error

func (*Client) GetAction added in v1.33.0

func (mock *Client) GetAction(name string) (grpcapi.Action, error)

func (*Client) GetActionWithContext added in v1.33.0

func (mock *Client) GetActionWithContext(ctx context.Context, name string) (grpcapi.Action, error)

func (*Client) GetActionsByUserRole added in v1.33.0

func (mock *Client) GetActionsByUserRole(userRole string) ([]grpcapi.Action, error)

func (*Client) GetActionsByUserRoleWithContext added in v1.33.0

func (mock *Client) GetActionsByUserRoleWithContext(ctx context.Context, userRole string) ([]grpcapi.Action, error)

func (*Client) GetAllActions added in v1.33.0

func (mock *Client) GetAllActions() ([]grpcapi.Action, error)

func (*Client) GetAllActionsWithContext added in v1.33.0

func (mock *Client) GetAllActionsWithContext(ctx context.Context) ([]grpcapi.Action, error)

func (*Client) GetResource added in v1.33.0

func (mock *Client) GetResource(id string, originType string) (common.Origin, error)

func (*Client) GetResourceChildren added in v1.33.0

func (mock *Client) GetResourceChildren(resource common.Origin, childOriginType string) (resources []common.Origin, err error)

func (*Client) GetResourceChildrenWithContext added in v1.33.0

func (mock *Client) GetResourceChildrenWithContext(ctx context.Context, resource common.Origin, childOriginType string) (resources []common.Origin, err error)

func (*Client) GetResourceParents added in v1.33.0

func (mock *Client) GetResourceParents(resource common.Origin, parentOriginType string) (resources []common.Origin, err error)

func (*Client) GetResourceParentsWithContext added in v1.33.0

func (mock *Client) GetResourceParentsWithContext(ctx context.Context, resource common.Origin, parentOriginType string) (resources []common.Origin, err error)

func (*Client) GetResourceWithContext added in v1.33.0

func (mock *Client) GetResourceWithContext(ctx context.Context, id string, originType string) (common.Origin, error)

func (*Client) GetResourcesAndActionsByUser added in v1.33.0

func (mock *Client) GetResourcesAndActionsByUser(userID string) ([]grpcapi.ActionResource, error)

func (*Client) GetResourcesAndActionsByUserWithContext added in v1.33.0

func (mock *Client) GetResourcesAndActionsByUserWithContext(ctx context.Context, userID string) ([]grpcapi.ActionResource, error)

func (*Client) GetResourcesByOriginAndType added in v1.33.0

func (mock *Client) GetResourcesByOriginAndType(resource common.Origin, resourceType string, depth int32) (resources []common.Origin, err error)

func (*Client) GetResourcesByOriginAndTypeWithContext added in v1.33.0

func (mock *Client) GetResourcesByOriginAndTypeWithContext(ctx context.Context, resource common.Origin, resourceType string, depth int32) (resources []common.Origin, err error)

func (*Client) GetResourcesByType added in v1.33.0

func (mock *Client) GetResourcesByType(resourceType string) (resources []common.Origin, err error)

func (*Client) GetResourcesByTypeWithContext added in v1.33.0

func (mock *Client) GetResourcesByTypeWithContext(ctx context.Context, resourceType string) (resources []common.Origin, err error)

func (*Client) GetResourcesByUserAction added in v1.33.0

func (mock *Client) GetResourcesByUserAction(userID, actionName, resourceType string) ([]common.Origin, error)

func (*Client) GetResourcesByUserActionWithContext added in v1.33.0

func (mock *Client) GetResourcesByUserActionWithContext(ctx context.Context, userID, actionName, resourceType string) ([]common.Origin, error)

func (*Client) GetResourcesWithActionsAccess added in v1.33.0

func (mock *Client) GetResourcesWithActionsAccess(actions []string, resourceType string, resource *common.Origin) ([]common.Origin, error)

func (*Client) GetResourcesWithActionsAccessWithContext added in v1.33.0

func (mock *Client) GetResourcesWithActionsAccessWithContext(ctx context.Context, actions []string, resourceType string, resource *common.Origin) ([]common.Origin, error)

func (*Client) GetUserActions added in v1.33.0

func (mock *Client) GetUserActions(userID string) ([]grpcapi.Action, error)

func (*Client) GetUserActionsWithContext added in v1.33.0

func (mock *Client) GetUserActionsWithContext(ctx context.Context, userID string) ([]grpcapi.Action, error)

func (*Client) GetUserIDsWithAccessToResource added in v1.33.0

func (mock *Client) GetUserIDsWithAccessToResource(resource common.Origin) (resources []string, err error)

func (*Client) GetUserIDsWithAccessToResourceWithContext added in v1.33.0

func (mock *Client) GetUserIDsWithAccessToResourceWithContext(ctx context.Context, resource common.Origin) (resources []string, err error)

func (*Client) GetUserRole added in v1.33.0

func (mock *Client) GetUserRole(roleName string) (grpcapi.UserRole, error)

func (*Client) GetUserRoleWithContext added in v1.33.0

func (mock *Client) GetUserRoleWithContext(ctx context.Context, roleName string) (grpcapi.UserRole, error)

func (*Client) IsAuthorized added in v1.33.0

func (mock *Client) IsAuthorized(userID, action string, resource *common.Origin) (bool, error)

func (*Client) IsAuthorizedBulk added in v1.33.0

func (mock *Client) IsAuthorizedBulk(userID, action string, resources []common.Origin) ([]string, []bool, error)

func (*Client) IsAuthorizedBulkWithContext added in v1.33.0

func (mock *Client) IsAuthorizedBulkWithContext(ctx context.Context, userID, action string, resources []common.Origin) ([]string, []bool, error)

func (*Client) IsAuthorizedByEndpoint added in v1.33.0

func (mock *Client) IsAuthorizedByEndpoint(api, method, endpoint, userID string) (bool, error)

func (*Client) IsAuthorizedByEndpointWithContext added in v1.33.0

func (mock *Client) IsAuthorizedByEndpointWithContext(ctx context.Context, api, method, endpoint, userID string) (bool, error)

func (*Client) IsAuthorizedWithContext added in v1.33.0

func (mock *Client) IsAuthorizedWithContext(ctx context.Context, userID, action string, resource *common.Origin) (bool, error)

func (*Client) RemoveAction added in v1.33.0

func (mock *Client) RemoveAction(name string) error

func (*Client) RemoveActionWithContext added in v1.33.0

func (mock *Client) RemoveActionWithContext(ctx context.Context, name string) error

func (*Client) RemoveResource added in v1.33.0

func (mock *Client) RemoveResource(resource common.Origin) error

func (*Client) RemoveResourceRelation added in v1.33.0

func (mock *Client) RemoveResourceRelation(resource common.Origin, parent common.Origin) error

func (*Client) RemoveResourceRelationWithContext added in v1.33.0

func (mock *Client) RemoveResourceRelationWithContext(ctx context.Context, resource common.Origin, parent common.Origin) error

func (*Client) RemoveResourceRelations added in v1.33.0

func (mock *Client) RemoveResourceRelations(resources grpcapi.RemoveResourceRelationsInput) error

func (*Client) RemoveResourceRelationsWithContext added in v1.33.0

func (mock *Client) RemoveResourceRelationsWithContext(ctx context.Context, resources grpcapi.RemoveResourceRelationsInput) error

func (*Client) RemoveResourceWithContext added in v1.33.0

func (mock *Client) RemoveResourceWithContext(ctx context.Context, resource common.Origin) error

func (*Client) RemoveResources added in v1.33.0

func (mock *Client) RemoveResources(resources []common.Origin) error

func (*Client) RemoveResourcesWithContext added in v1.33.0

func (mock *Client) RemoveResourcesWithContext(ctx context.Context, resources []common.Origin) error

func (*Client) RemoveUserAction added in v1.33.0

func (mock *Client) RemoveUserAction(userID, action string, resource *common.Origin) error

func (*Client) RemoveUserActionWithContext added in v1.33.0

func (mock *Client) RemoveUserActionWithContext(ctx context.Context, userID, action string, resource *common.Origin) error

func (*Client) RemoveUserRole added in v1.33.0

func (mock *Client) RemoveUserRole(roleName string) error

func (*Client) RemoveUserRoleWithContext added in v1.33.0

func (mock *Client) RemoveUserRoleWithContext(ctx context.Context, roleName string) error

func (*Client) SetRequestTimeout added in v1.33.0

func (mock *Client) SetRequestTimeout(d time.Duration)

Jump to

Keyboard shortcuts

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