manager_client

package
v0.0.0-...-614d85d Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// TODO Put this url config via app args
	// ManagerServiceURL refers to the URL of the Manager service
	ManagerServiceURL = os.Getenv("MANAGER_SERVICE_URL")

	ErrCustomerNotfound    = errors.New("customer not found")
	ErrForbidden           = errors.New("Forbidden")
	ErrUnauthorized        = errors.New("Unauthorized")
	ErrRoleBindingNotFound = errors.New("role-binding not found")
)

Functions

This section is empty.

Types

type CustomerClient

type CustomerClient interface {
	Get(name string) (*model.Customer, error)
}

CustomerClient interface defines Customer APIs

func NewCustomerClient

func NewCustomerClient(serverURL string) CustomerClient

NewCustomerClient makes a client calling Customer APIs

type ManagerClient

type ManagerClient interface {
	// Query Manager service to get all buckets of the tenant
	ListBuckets() ([]model.Bucket, error)

	// Create a bucket object at Manager service
	CreateBucket(bucketName string) (*model.Bucket, error)

	DeleteBucket(bucketName string) error

	UpdateACLs(bucketName string, acls authz.ACLList) (*model.Bucket, error)

	ListRoleBindings() ([]rbac.RoleBinding, error)

	CreateRoleBinding(roleBinding rbac.RoleBinding) (*rbac.RoleBinding, error)

	DeleteRoleBinding(name string) error

	ListRoles() ([]rbac.Role, error)
}

ManagerClient interface defines Manager APIs

func New

func New(serverURL string, customerName, userId string, userGroups []string) ManagerClient

Jump to

Keyboard shortcuts

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