clients

package
v1.0.2-rc.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthClient

type AuthClient interface {
	UpdateUserAccess(ctx context.Context, userID string, access *authProto.ResourcesAccess) error

	// for connections closing
	io.Closer
}

AuthClient is an interface to auth service

func NewAuthDummyClient

func NewAuthDummyClient() AuthClient

NewAuthDummyClient creates dummy auth client

type AuthDummyClient

type AuthDummyClient struct {
	// contains filtered or unexported fields
}

func (AuthDummyClient) Close

func (AuthDummyClient) Close() error

func (AuthDummyClient) String

func (AuthDummyClient) String() string

func (AuthDummyClient) UpdateUserAccess

func (as AuthDummyClient) UpdateUserAccess(ctx context.Context, userID string, access *authProto.ResourcesAccess) error

type AuthGRPCClient

type AuthGRPCClient struct {
	// contains filtered or unexported fields
}

func NewAuthGRPCClient

func NewAuthGRPCClient(addr string) (as *AuthGRPCClient, err error)

NewAuthGRPCClient creates grpc client to auth service. It does nothing but logs actions.

func (AuthGRPCClient) Close

func (as AuthGRPCClient) Close() error

func (AuthGRPCClient) String

func (as AuthGRPCClient) String() string

func (AuthGRPCClient) UpdateUserAccess

func (as AuthGRPCClient) UpdateUserAccess(ctx context.Context, userID string, access *authProto.ResourcesAccess) error

type BillingClient

type BillingClient interface {
	Subscribe(ctx context.Context, req btypes.SubscribeTariffRequest) error
	Rename(ctx context.Context, resourceID, newLabel string) error
	UpdateSubscription(ctx context.Context, resourceID, newTariffID string) error
	Unsubscribe(ctx context.Context, resourceID string) error
	MassiveUnsubscribe(ctx context.Context, resourceIDs []string) error

	GetNamespaceTariff(ctx context.Context, tariffID string) (btypes.NamespaceTariff, error)
	GetVolumeTariff(ctx context.Context, tariffID string) (btypes.VolumeTariff, error)
}

BillingClient is an interface to billing service

type BillingDummyClient

type BillingDummyClient struct {
	// contains filtered or unexported fields
}

func NewBillingDummyClient

func NewBillingDummyClient() BillingDummyClient

NewDummyBilling creates a dummy billing service client. It does nothing but logs actions.

func (BillingDummyClient) GetNamespaceTariff

func (b BillingDummyClient) GetNamespaceTariff(ctx context.Context, tariffID string) (btypes.NamespaceTariff, error)

func (BillingDummyClient) GetVolumeTariff

func (b BillingDummyClient) GetVolumeTariff(ctx context.Context, tariffID string) (btypes.VolumeTariff, error)

func (BillingDummyClient) MassiveUnsubscribe

func (b BillingDummyClient) MassiveUnsubscribe(ctx context.Context, resourceIDs []string) error

func (BillingDummyClient) Rename

func (b BillingDummyClient) Rename(ctx context.Context, resourceID, newLabel string) error

func (BillingDummyClient) String

func (b BillingDummyClient) String() string

func (BillingDummyClient) Subscribe

func (BillingDummyClient) Unsubscribe

func (b BillingDummyClient) Unsubscribe(ctx context.Context, resourceID string) error

func (BillingDummyClient) UpdateSubscription added in v1.0.2

func (b BillingDummyClient) UpdateSubscription(ctx context.Context, resourceID, newTariffID string) error

type BillingHTTPClient

type BillingHTTPClient struct {
	// contains filtered or unexported fields
}

func NewBillingHTTPClient

func NewBillingHTTPClient(u *url.URL) *BillingHTTPClient

func (*BillingHTTPClient) GetNamespaceTariff

func (b *BillingHTTPClient) GetNamespaceTariff(ctx context.Context, tariffID string) (btypes.NamespaceTariff, error)

func (*BillingHTTPClient) GetVolumeTariff

func (b *BillingHTTPClient) GetVolumeTariff(ctx context.Context, tariffID string) (btypes.VolumeTariff, error)

func (*BillingHTTPClient) MassiveUnsubscribe

func (b *BillingHTTPClient) MassiveUnsubscribe(ctx context.Context, resourceIDs []string) error

func (*BillingHTTPClient) Rename

func (b *BillingHTTPClient) Rename(ctx context.Context, resourceID, newLabel string) error

func (BillingHTTPClient) String

func (b BillingHTTPClient) String() string

func (*BillingHTTPClient) Subscribe

func (*BillingHTTPClient) Unsubscribe

func (b *BillingHTTPClient) Unsubscribe(ctx context.Context, resourceID string) error

func (*BillingHTTPClient) UpdateSubscription added in v1.0.2

func (b *BillingHTTPClient) UpdateSubscription(ctx context.Context, resourceID, newTariffID string) error

type KubeAPIClient

type KubeAPIClient interface {
	CreateNamespace(ctx context.Context, req model.Namespace) error
	SetNamespaceQuota(ctx context.Context, ns model.Namespace) error
	DeleteNamespace(ctx context.Context, ns model.Namespace) error
	DeleteUserNamespaces(ctx context.Context, userID string) error
	GetNamespace(ctx context.Context, name string) (model.Namespace, error)
}

type KubeAPIDummyClient

type KubeAPIDummyClient struct {
	// contains filtered or unexported fields
}

func NewKubeAPIDummyClient

func NewKubeAPIDummyClient() *KubeAPIDummyClient

func (*KubeAPIDummyClient) CreateNamespace

func (k *KubeAPIDummyClient) CreateNamespace(ctx context.Context, req model.Namespace) error

func (*KubeAPIDummyClient) DeleteNamespace

func (k *KubeAPIDummyClient) DeleteNamespace(ctx context.Context, ns model.Namespace) error

func (*KubeAPIDummyClient) DeleteUserNamespaces added in v1.0.2

func (k *KubeAPIDummyClient) DeleteUserNamespaces(ctx context.Context, userID string) error

func (*KubeAPIDummyClient) GetNamespace

func (k *KubeAPIDummyClient) GetNamespace(ctx context.Context, name string) (ret model.Namespace, err error)

func (*KubeAPIDummyClient) SetNamespaceQuota

func (k *KubeAPIDummyClient) SetNamespaceQuota(ctx context.Context, ns model.Namespace) error

func (*KubeAPIDummyClient) String

func (k *KubeAPIDummyClient) String() string

type KubeAPIHTTPClient

type KubeAPIHTTPClient struct {
	// contains filtered or unexported fields
}

func NewKubeAPIHTTPClient

func NewKubeAPIHTTPClient(url *url.URL) *KubeAPIHTTPClient

func (*KubeAPIHTTPClient) CreateNamespace

func (k *KubeAPIHTTPClient) CreateNamespace(ctx context.Context, req model.Namespace) error

func (*KubeAPIHTTPClient) DeleteNamespace

func (k *KubeAPIHTTPClient) DeleteNamespace(ctx context.Context, ns model.Namespace) error

func (*KubeAPIHTTPClient) DeleteUserNamespaces added in v1.0.2

func (k *KubeAPIHTTPClient) DeleteUserNamespaces(ctx context.Context, userID string) error

func (*KubeAPIHTTPClient) GetNamespace

func (k *KubeAPIHTTPClient) GetNamespace(ctx context.Context, name string) (ret model.Namespace, err error)

func (*KubeAPIHTTPClient) SetNamespaceQuota

func (k *KubeAPIHTTPClient) SetNamespaceQuota(ctx context.Context, ns model.Namespace) error

func (*KubeAPIHTTPClient) String

func (k *KubeAPIHTTPClient) String() string

type ResourceServiceClient

type ResourceServiceClient interface {
	DeleteNamespaceResources(ctx context.Context, namespaceID string) error
	DeleteAllUserNamespaces(ctx context.Context) error
}

type ResourceServiceDummyClient

type ResourceServiceDummyClient struct {
	// contains filtered or unexported fields
}

func NewResourceServiceDummyClient

func NewResourceServiceDummyClient() *ResourceServiceDummyClient

func (*ResourceServiceDummyClient) DeleteAllUserNamespaces

func (r *ResourceServiceDummyClient) DeleteAllUserNamespaces(ctx context.Context) error

func (*ResourceServiceDummyClient) DeleteNamespaceResources

func (r *ResourceServiceDummyClient) DeleteNamespaceResources(ctx context.Context, namespaceID string) error

type ResourceServiceHTTPClient

type ResourceServiceHTTPClient struct {
	// contains filtered or unexported fields
}

func NewResourceServiceHTTPClient

func NewResourceServiceHTTPClient(url *url.URL) *ResourceServiceHTTPClient

func (*ResourceServiceHTTPClient) DeleteAllUserNamespaces

func (r *ResourceServiceHTTPClient) DeleteAllUserNamespaces(ctx context.Context) error

func (*ResourceServiceHTTPClient) DeleteNamespaceResources

func (r *ResourceServiceHTTPClient) DeleteNamespaceResources(ctx context.Context, namespaceID string) error

type SolutionsClient added in v1.0.2

type SolutionsClient interface {
	DeleteNamespaceSolutions(ctx context.Context, nsID string) error
	DeleteUserSolutions(ctx context.Context) error
}

type SolutionsDummyClient added in v1.0.2

type SolutionsDummyClient struct {
	// contains filtered or unexported fields
}

func NewSolutionsDummyClient added in v1.0.2

func NewSolutionsDummyClient() *SolutionsDummyClient

func (*SolutionsDummyClient) DeleteNamespaceSolutions added in v1.0.2

func (s *SolutionsDummyClient) DeleteNamespaceSolutions(ctx context.Context, nsID string) error

func (*SolutionsDummyClient) DeleteUserSolutions added in v1.0.2

func (s *SolutionsDummyClient) DeleteUserSolutions(ctx context.Context) error

func (SolutionsDummyClient) String added in v1.0.2

func (s SolutionsDummyClient) String() string

type SolutionsHTTPClient added in v1.0.2

type SolutionsHTTPClient struct {
	// contains filtered or unexported fields
}

func NewSolutionsHTTPClient added in v1.0.2

func NewSolutionsHTTPClient(url *url.URL) *SolutionsHTTPClient

func (*SolutionsHTTPClient) DeleteNamespaceSolutions added in v1.0.2

func (s *SolutionsHTTPClient) DeleteNamespaceSolutions(ctx context.Context, nsID string) error

func (*SolutionsHTTPClient) DeleteUserSolutions added in v1.0.2

func (s *SolutionsHTTPClient) DeleteUserSolutions(ctx context.Context) error

func (SolutionsHTTPClient) String added in v1.0.2

func (s SolutionsHTTPClient) String() string

type UserManagerClient

type UserManagerClient interface {
	UserInfoByLogin(ctx context.Context, login string) (*umtypes.User, error)
	UserInfoByID(ctx context.Context, userID string) (*umtypes.User, error)
	UserLoginIDList(ctx context.Context, userIDs ...string) (map[string]string, error)

	Group(ctx context.Context, groupID string) (*kubeClientModel.UserGroup, error)
	GroupNameIDList(ctx context.Context, groupIDs ...string) (map[string]string, error)
	GroupFullIDList(ctx context.Context, groupIDs ...string) (*kubeClientModel.UserGroups, error)
}

UserManagerClient is interface to user-manager service

type UserManagerDummyClient

type UserManagerDummyClient struct {
	// contains filtered or unexported fields
}

func NewUserManagerDummyClient

func NewUserManagerDummyClient() *UserManagerDummyClient

func (*UserManagerDummyClient) Group added in v1.0.2

func (*UserManagerDummyClient) GroupFullIDList added in v1.0.2

func (u *UserManagerDummyClient) GroupFullIDList(ctx context.Context, groupIDs ...string) (*kubeClientModel.UserGroups, error)

func (*UserManagerDummyClient) GroupNameIDList added in v1.0.2

func (u *UserManagerDummyClient) GroupNameIDList(ctx context.Context, groupIDs ...string) (map[string]string, error)

func (*UserManagerDummyClient) String

func (u *UserManagerDummyClient) String() string

func (*UserManagerDummyClient) UserInfoByID

func (u *UserManagerDummyClient) UserInfoByID(ctx context.Context, userID string) (*umtypes.User, error)

func (*UserManagerDummyClient) UserInfoByLogin

func (u *UserManagerDummyClient) UserInfoByLogin(ctx context.Context, login string) (*umtypes.User, error)

func (*UserManagerDummyClient) UserLoginIDList

func (u *UserManagerDummyClient) UserLoginIDList(ctx context.Context, userIDs ...string) (map[string]string, error)

type UserManagerHTTPClient

type UserManagerHTTPClient struct {
	// contains filtered or unexported fields
}

func NewUserManagerHTTPClient

func NewUserManagerHTTPClient(url *url.URL) *UserManagerHTTPClient

NewUserManagerHTTPClient returns rest-client to user-manager service

func (*UserManagerHTTPClient) Group added in v1.0.2

func (*UserManagerHTTPClient) GroupFullIDList added in v1.0.2

func (u *UserManagerHTTPClient) GroupFullIDList(ctx context.Context, groupIDs ...string) (*kubeClientModel.UserGroups, error)

func (*UserManagerHTTPClient) GroupNameIDList added in v1.0.2

func (u *UserManagerHTTPClient) GroupNameIDList(ctx context.Context, groupIDs ...string) (map[string]string, error)

func (*UserManagerHTTPClient) String

func (u *UserManagerHTTPClient) String() string

func (*UserManagerHTTPClient) UserInfoByID

func (u *UserManagerHTTPClient) UserInfoByID(ctx context.Context, userID string) (*umtypes.User, error)

func (*UserManagerHTTPClient) UserInfoByLogin

func (u *UserManagerHTTPClient) UserInfoByLogin(ctx context.Context, login string) (*umtypes.User, error)

func (*UserManagerHTTPClient) UserLoginIDList

func (u *UserManagerHTTPClient) UserLoginIDList(ctx context.Context, userIDs ...string) (map[string]string, error)

type VolumeManagerClient

type VolumeManagerClient interface {
	CreateVolume(ctx context.Context, nsID, label string, capacity int) error
	DeleteNamespaceVolume(ctx context.Context, nsID, volume string) error
	DeleteNamespaceVolumes(ctx context.Context, nsID string) error
	GetNamespaceVolumes(ctx context.Context, nsID string) ([]kubeClientModel.Volume, error)
	DeleteAllUserVolumes(ctx context.Context) error
}

type VolumeManagerDummyClient

type VolumeManagerDummyClient struct {
	// contains filtered or unexported fields
}

func NewVolumeManagerDummyClient

func NewVolumeManagerDummyClient() *VolumeManagerDummyClient

func (*VolumeManagerDummyClient) CreateVolume

func (v *VolumeManagerDummyClient) CreateVolume(ctx context.Context, nsID, label string, capacity int) error

func (*VolumeManagerDummyClient) DeleteAllUserVolumes

func (v *VolumeManagerDummyClient) DeleteAllUserVolumes(ctx context.Context) error

func (*VolumeManagerDummyClient) DeleteNamespaceVolume added in v1.0.2

func (v *VolumeManagerDummyClient) DeleteNamespaceVolume(ctx context.Context, nsID, volume string) error

func (*VolumeManagerDummyClient) DeleteNamespaceVolumes

func (v *VolumeManagerDummyClient) DeleteNamespaceVolumes(ctx context.Context, nsID string) error

func (*VolumeManagerDummyClient) GetNamespaceVolumes added in v1.0.2

func (v *VolumeManagerDummyClient) GetNamespaceVolumes(ctx context.Context, nsID string) ([]kubeClientModel.Volume, error)

type VolumeManagerHTTPClient

type VolumeManagerHTTPClient struct {
	// contains filtered or unexported fields
}

func NewVolumeManagerHTTPClient

func NewVolumeManagerHTTPClient(url *url.URL) *VolumeManagerHTTPClient

func (*VolumeManagerHTTPClient) CreateVolume

func (v *VolumeManagerHTTPClient) CreateVolume(ctx context.Context, nsID, label string, capacity int) error

func (*VolumeManagerHTTPClient) DeleteAllUserVolumes

func (v *VolumeManagerHTTPClient) DeleteAllUserVolumes(ctx context.Context) error

func (*VolumeManagerHTTPClient) DeleteNamespaceVolume added in v1.0.2

func (v *VolumeManagerHTTPClient) DeleteNamespaceVolume(ctx context.Context, nsID, volume string) error

func (*VolumeManagerHTTPClient) DeleteNamespaceVolumes

func (v *VolumeManagerHTTPClient) DeleteNamespaceVolumes(ctx context.Context, nsID string) error

func (*VolumeManagerHTTPClient) GetNamespaceVolumes added in v1.0.2

func (v *VolumeManagerHTTPClient) GetNamespaceVolumes(ctx context.Context, nsID string) ([]kubeClientModel.Volume, error)

Jump to

Keyboard shortcuts

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