Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthorizeClient ¶
type AuthorizeClient interface { Dial(host, port string, opts ...grpc.DialOption) error DialWithContext(ctx context.Context, host, port string, opts ...grpc.DialOption) error Close() DeepPing() error DeepPingWithContext(ctx context.Context) error IsAuthorized(userID, action string, resource *common.Origin) (bool, error) IsAuthorizedWithContext(ctx context.Context, userID, action string, resource *common.Origin) (bool, error) IsAuthorizedByEndpoint(api, method, endpoint, userID string) (bool, error) IsAuthorizedByEndpointWithContext(ctx context.Context, api, method, endpoint, userID string) (bool, error) AddResource(resource common.Origin) error AddResourceWithContext(ctx context.Context, resource common.Origin) error RemoveResource(resource common.Origin) error RemoveResourceWithContext(ctx context.Context, resource common.Origin) error GetResourcesByType(resourceType string) (resources []common.Origin, err error) GetResourcesByTypeWithContext(ctx context.Context, resourceType string) (resources []common.Origin, err error) GetResourcesByOriginAndType(originID string, resourceType string) (resources []common.Origin, err error) GetResourcesByOriginAndTypeWithContext(ctx context.Context, originID string, resourceType string) (resources []common.Origin, err error) GetUserIDsWithAccessToResource(originID string) (resources []string, err error) GetUserIDsWithAccessToResourceWithContext(ctx context.Context, originID string) (resources []string, err error) AddResourceRelation(resource common.Origin, parent common.Origin) error AddResourceRelationWithContext(ctx context.Context, resource common.Origin, parent common.Origin) error RemoveResourceRelation(resource common.Origin, parent common.Origin) error RemoveResourceRelationWithContext(ctx context.Context, resource common.Origin, parent common.Origin) error GetResourceRelations(resource common.Origin) (resources []common.Origin, err error) GetResourceRelationsWithContext(ctx context.Context, resource common.Origin) (resources []common.Origin, err error) AddUserPermission(userID, role string, resource *common.Origin) error AddUserPermissionWithContext(ctx context.Context, userID, role string, resource *common.Origin) error RemoveUserPermission(userID, role string, resource *common.Origin) error RemoveUserPermissionWithContext(ctx context.Context, userID, role string, resource *common.Origin) error }
func CreateClient ¶
func CreateClient() AuthorizeClient
Click to show internal directories.
Click to hide internal directories.