Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterOrgGetter ¶
type ClusterOrgGetter interface {
GetOrganization(ctx context.Context, clusterID uint) (auth.Organization, error)
}
ClusterOrgGetter can be used to get the organization a cluster belongs to
type ClusterOrgGetterImpl ¶
type ClusterOrgGetterImpl struct {
// contains filtered or unexported fields
}
ClusterOrgGetterImpl implements a ClusterOrgGetter
func NewClusterOrgGetter ¶
func NewClusterOrgGetter(clusterGetter CommonClusterGetter, orgGetter OrgGetter) ClusterOrgGetterImpl
NewClusterOrgGetter returns a new ClusterOrgGetter implementation
func (ClusterOrgGetterImpl) GetOrganization ¶
func (g ClusterOrgGetterImpl) GetOrganization(ctx context.Context, clusterID uint) (auth.Organization, error)
GetOrganization returns the organization the specified cluster belongs to
type ClusterPropertyGetter ¶
type ClusterPropertyGetter struct {
// contains filtered or unexported fields
}
ClusterPropertyGetter can be used to get a cluster's properties
func NewClusterPropertyGetter ¶
func NewClusterPropertyGetter(clusterGetter CommonClusterGetter) ClusterPropertyGetter
NewClusterPropertyGetter returns a new ClusterPropertyGetter instance
func (ClusterPropertyGetter) GetClusterOrgID ¶
GetClusterOrgID returns the specified cluster's organization ID
func (ClusterPropertyGetter) GetClusterUID ¶
GetClusterUID returns the specified cluster's UID
type CommonClusterGetter ¶
type CommonClusterGetter interface {
GetClusterByIDOnly(ctx context.Context, clusterID uint) (cluster.CommonCluster, error)
}
CommonClusterGetter can be used to get a cluster by its ID
type DNSServiceClient ¶
type DNSServiceClient interface { IsDomainRegistered(orgID uint, domain string) (bool, error) RegisterDomain(orgID uint, domain string) error }
DNSServiceClient can be used to register and check registration of an organization's domain
type OrgDomainService ¶
type OrgDomainService struct {
// contains filtered or unexported fields
}
OrgDomainService can be used to ensure that the organization's domain is registered with a DNS service
func NewOrgDomainService ¶
func NewOrgDomainService(baseDomain string, dnsServiceClient DNSServiceClient, clusterOrgGetter ClusterOrgGetter, logger common.Logger) OrgDomainService
NewOrgDomainService returns a new OrgDomainService initialized with the specified values
func (OrgDomainService) EnsureOrgDomain ¶
func (s OrgDomainService) EnsureOrgDomain(ctx context.Context, clusterID uint) error
EnsureOrgDomain makes sure that the organization the specified cluster belongs to has its domain registered with the DNS service