Documentation
¶
Index ¶
- type CertificateApp
- type CertificateAuthorityApp
- func (app *CertificateAuthorityApp) CreateCA(caInfo *CertificateAuthorityEditableItem) error
- func (app *CertificateAuthorityApp) Get() (*CertificateAuthorityDetail, error)
- func (app *CertificateAuthorityApp) GetBuiltInCAConfig() (*entity.CertificateAuthorityConfigurationStepCA, error)
- func (app *CertificateAuthorityApp) Update(uuid string, caInfo *CertificateAuthorityEditableItem) error
- type CertificateAuthorityDetail
- type CertificateAuthorityEditableItem
- type CertificateAuthorityStatus
- type CertificateBindingListItem
- type CertificateListItem
- type ChartApp
- type ChartDetail
- type ChartListItem
- type EndpointApp
- func (app *EndpointApp) CheckKubeFATEConnection(uuid string) error
- func (app *EndpointApp) CreateEndpoint(req *EndpointCreationRequest) (string, error)
- func (app *EndpointApp) DeleteEndpoint(uuid string, uninstall bool) error
- func (app *EndpointApp) GetEndpointDetail(uuid string) (*EndpointDetail, error)
- func (app *EndpointApp) GetEndpointList() ([]EndpointListItem, error)
- func (app *EndpointApp) GetKubeFATEDeploymentYAML(namespace, serviceUsername, servicePassword, hostname string, ...) (string, error)
- func (app *EndpointApp) ScanEndpoint(req *EndpointScanRequest) ([]EndpointScanItem, error)
- type EndpointCreationRequest
- type EndpointDetail
- type EndpointListItem
- type EndpointScanItem
- type EndpointScanRequest
- type EventApp
- type EventListItem
- type FATEClusterDetail
- type FATEClusterUpgradeableInfo
- type FATEClusterUpgradeableVersionList
- type FATEExchangeDetail
- type FederationApp
- func (app *FederationApp) CreateFATEFederation(req *FederationFATECreationRequest) (string, error)
- func (app *FederationApp) CreateOpenFLFederation(req *FederationOpenFLCreationRequest) (string, error)
- func (app *FederationApp) DeleteFATEFederation(uuid string) error
- func (app *FederationApp) DeleteOpenFLFederation(uuid string) error
- func (app *FederationApp) DeleteOpenFLToken(uuid, federationUUID string) error
- func (app *FederationApp) GeneratedOpenFLToken(req *RegistrationTokenOpenFLBasicInfo, federationUUID string) error
- func (app *FederationApp) GetFATEFederation(uuid string) (*FederationFATEDetail, error)
- func (app *FederationApp) GetOpenFLFederation(uuid string) (*FederationOpenFLDetail, error)
- func (app *FederationApp) List() ([]FederationListItem, error)
- func (app *FederationApp) ListOpenFLToken(federationUUID string) ([]RegistrationTokenOpenFLListItem, error)
- type FederationCreationRequest
- type FederationFATECreationRequest
- type FederationFATEDetail
- type FederationListItem
- type FederationOpenFLCreationRequest
- type FederationOpenFLDetail
- type InfraProviderApp
- func (app *InfraProviderApp) CreateProvider(providerInfo *InfraProviderCreationRequest) error
- func (app *InfraProviderApp) DeleteProvider(uuid string) error
- func (app *InfraProviderApp) GetProviderDetail(uuid string) (*InfraProviderDetail, error)
- func (app *InfraProviderApp) GetProviderList() ([]InfraProviderListItem, error)
- func (app *InfraProviderApp) TestKubernetesConnection(kubeconfig *valueobject.KubeConfig) error
- func (app *InfraProviderApp) UpdateProvider(uuid string, updateProviderInfo *InfraProviderUpdateRequest) error
- type InfraProviderCreationRequest
- type InfraProviderDetail
- type InfraProviderEditableItem
- type InfraProviderInfoKubernetes
- type InfraProviderItemBase
- type InfraProviderKubernetesConfig
- type InfraProviderListItem
- type InfraProviderListItemKubernetes
- type InfraProviderUpdateRequest
- type LoginInfo
- type OpenFLDirectorDetail
- type OpenFLEnvoyDetail
- type ParticipantApp
- func (app *ParticipantApp) CheckFATPartyID(federationUUID string, partyID int) error
- func (app *ParticipantApp) CreateExternalFATECluster(req *service.ParticipantFATEExternalClusterCreationRequest) (string, error)
- func (app *ParticipantApp) CreateExternalFATEExchange(req *service.ParticipantFATEExternalExchangeCreationRequest) (string, error)
- func (app *ParticipantApp) CreateFATECluster(req *service.ParticipantFATEClusterCreationRequest) (string, error)
- func (app *ParticipantApp) CreateFATEExchange(req *service.ParticipantFATEExchangeCreationRequest) (string, error)
- func (app *ParticipantApp) CreateOpenFLDirector(req *service.ParticipantOpenFLDirectorCreationRequest) (string, error)
- func (app *ParticipantApp) GetFATEClusterDeploymentYAML(req *service.ParticipantFATEClusterYAMLCreationRequest) (string, error)
- func (app *ParticipantApp) GetFATEClusterDetail(uuid string) (*FATEClusterDetail, error)
- func (app *ParticipantApp) GetFATEClusterUpgrade(ClisterUUID string) (*FATEClusterUpgradeableInfo, error)
- func (app *ParticipantApp) GetFATEExchangeDeploymentYAML(req *service.ParticipantFATEExchangeYAMLCreationRequest) (string, error)
- func (app *ParticipantApp) GetFATEExchangeDetail(uuid string) (*FATEExchangeDetail, error)
- func (app *ParticipantApp) GetFATEExchangeUpgrade(ExchangeUUID string) (*FATEClusterUpgradeableInfo, error)
- func (app *ParticipantApp) GetFATEParticipantList(federationUUID string) (*ParticipantFATEListInFederation, error)
- func (app *ParticipantApp) GetOpenFLDirectorDeploymentYAML(req *service.ParticipantOpenFLDirectorYAMLCreationRequest) (string, error)
- func (app *ParticipantApp) GetOpenFLDirectorDetail(uuid string) (*OpenFLDirectorDetail, error)
- func (app *ParticipantApp) GetOpenFLEnvoyDetail(uuid string) (*OpenFLEnvoyDetail, error)
- func (app *ParticipantApp) GetOpenFLEnvoyDetailWithTokenVerification(uuid, tokenStr string) (*OpenFLEnvoyDetail, error)
- func (app *ParticipantApp) GetOpenFLParticipantList(federationUUID string) (*ParticipantOpenFLListInFederation, error)
- func (app *ParticipantApp) HandleOpenFLEnvoyRegistration(req *service.ParticipantOpenFLEnvoyRegistrationRequest) (string, error)
- func (app *ParticipantApp) RemoveFATECluster(uuid string, force bool) error
- func (app *ParticipantApp) RemoveFATEExchange(uuid string, force bool) error
- func (app *ParticipantApp) RemoveOpenFLDirector(uuid string, force bool) error
- func (app *ParticipantApp) RemoveOpenFLEnvoy(uuid string, force bool) error
- func (app *ParticipantApp) UpgradeFATECluster(req *service.ParticipantFATEClusterUpgradeRequest) (string, error)
- func (app *ParticipantApp) UpgradeFATEExchange(req *service.ParticipantFATEExchangeUpgradeRequest) (string, error)
- type ParticipantFATEListInFederation
- type ParticipantFATEListItem
- type ParticipantOpenFLListInFederation
- type ParticipantOpenFLListItem
- type PublicUser
- type PwdChangeInfo
- type RegistrationTokenOpenFLBasicInfo
- type RegistrationTokenOpenFLListItem
- type UserApp
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CertificateApp ¶
type CertificateApp struct {
CertificateAuthorityRepo repo.CertificateAuthorityRepository
CertificateRepo repo.CertificateRepository
CertificateBindingRepo repo.CertificateBindingRepository
ParticipantFATERepo repo.ParticipantFATERepository
ParticipantOpenFLRepo repo.ParticipantOpenFLRepository
FederationFATERepo repo.FederationRepository
FederationOpenFLRepo repo.FederationRepository
}
CertificateApp provides functions to manage the certificates
func (*CertificateApp) DeleteCertificate ¶
func (app *CertificateApp) DeleteCertificate(uuid string) error
DeleteCertificate deletes the certificate which has no participants bindings
func (*CertificateApp) List ¶
func (app *CertificateApp) List() (certificateList []CertificateListItem, err error)
List returns the currently managed certificates
type CertificateAuthorityApp ¶
type CertificateAuthorityApp struct {
CertificateAuthorityRepo repo.CertificateAuthorityRepository
}
CertificateAuthorityApp provides functions to manage the Certificate Authority
func (*CertificateAuthorityApp) CreateCA ¶
func (app *CertificateAuthorityApp) CreateCA(caInfo *CertificateAuthorityEditableItem) error
CreateCA creates a certificate authority
func (*CertificateAuthorityApp) Get ¶
func (app *CertificateAuthorityApp) Get() (*CertificateAuthorityDetail, error)
Get returns the current CA configuration
func (*CertificateAuthorityApp) GetBuiltInCAConfig ¶
func (app *CertificateAuthorityApp) GetBuiltInCAConfig() (*entity.CertificateAuthorityConfigurationStepCA, error)
GetBuiltInCAConfig returns the config of built-in StepCA config Unnecessary to move to domain package due to simple logic
func (*CertificateAuthorityApp) Update ¶
func (app *CertificateAuthorityApp) Update(uuid string, caInfo *CertificateAuthorityEditableItem) error
Update changes CA settings
type CertificateAuthorityDetail ¶
type CertificateAuthorityDetail struct {
CertificateAuthorityEditableItem
UUID string `json:"uuid"`
CreatedAt time.Time `json:"created_at"`
Status CertificateAuthorityStatus `json:"status"`
StatusMessage string `json:"status_message"`
}
CertificateAuthorityDetail contains the detail info of Certificate Authority
type CertificateAuthorityEditableItem ¶
type CertificateAuthorityEditableItem struct {
Name string `json:"name"`
Description string `json:"description"`
Type entity.CertificateAuthorityType `json:"type"`
Config map[string]interface{} `json:"config"`
}
CertificateAuthorityEditableItem contains properties of a CA that should be provided by the user
type CertificateAuthorityStatus ¶
type CertificateAuthorityStatus uint8
CertificateAuthorityStatus is the certificate authority status
const ( CertificateAuthorityStatusUnknown CertificateAuthorityStatus = iota CertificateAuthorityStatusUnhealthy CertificateAuthorityStatusHealthy )
type CertificateBindingListItem ¶
type CertificateBindingListItem struct {
ServiceType entity.CertificateBindingServiceType `json:"service_type"`
ParticipantUUID string `json:"participant_uuid"`
ParticipantName string `json:"participant_name"`
ParticipantType string `json:"participant_type"`
ServiceDescription string `json:"service_description"`
FederationUUID string `json:"federation_uuid"`
FederationName string `json:"federation_name"`
FederationType entity.FederationType `json:"federation_type"`
}
CertificateBindingListItem contains binding information of a certificate
type CertificateListItem ¶
type CertificateListItem struct {
Name string `json:"name"`
UUID string `json:"uuid"`
SerialNumber string `json:"serial_number"`
ExpirationDate time.Time `json:"expiration_date"`
CommonName string `json:"common_name"`
Bindings []CertificateBindingListItem `json:"bindings"`
}
CertificateListItem contains basic info of a certificate
type ChartApp ¶
type ChartApp struct {
ChartRepo repo.ChartRepository
}
ChartApp provide functions to manage the available helm charts
type ChartDetail ¶
type ChartDetail struct {
ChartListItem
About string `json:"about"`
Values string `json:"values"`
ValuesTemplate string `json:"values_template"`
}
ChartDetail contains detailed info of a chart
type ChartListItem ¶
type ChartListItem struct {
UUID string `json:"uuid"`
Name string `json:"name"`
ChartName string `json:"chart_name"`
Version string `json:"version"`
Description string `json:"description"`
Type entity.ChartType `json:"type"`
CreatedAt time.Time `json:"created_at"`
ContainPortalServices bool `json:"contain_portal_services"`
}
ChartListItem contains basic info of a chart that can be used in a "list" view
type EndpointApp ¶
type EndpointApp struct {
InfraProviderKubernetesRepo repo.InfraProviderRepository
EndpointKubeFAETRepo repo.EndpointRepository
ParticipantFATERepo repo.ParticipantFATERepository
ParticipantOpenFLRepo repo.ParticipantOpenFLRepository
EventRepo repo.EventRepository
}
EndpointApp provide functions to manage the endpoints
func (*EndpointApp) CheckKubeFATEConnection ¶
func (app *EndpointApp) CheckKubeFATEConnection(uuid string) error
CheckKubeFATEConnection tests connection to a KubeFATE endpoint
func (*EndpointApp) CreateEndpoint ¶
func (app *EndpointApp) CreateEndpoint(req *EndpointCreationRequest) (string, error)
CreateEndpoint add or install an endpoint
func (*EndpointApp) DeleteEndpoint ¶
func (app *EndpointApp) DeleteEndpoint(uuid string, uninstall bool) error
DeleteEndpoint removes the endpoint
func (*EndpointApp) GetEndpointDetail ¶
func (app *EndpointApp) GetEndpointDetail(uuid string) (*EndpointDetail, error)
GetEndpointDetail returns detailed information of an endpoint
func (*EndpointApp) GetEndpointList ¶
func (app *EndpointApp) GetEndpointList() ([]EndpointListItem, error)
GetEndpointList returns currently managed endpoints
func (*EndpointApp) GetKubeFATEDeploymentYAML ¶
func (app *EndpointApp) GetKubeFATEDeploymentYAML(namespace, serviceUsername, servicePassword, hostname string, registryConfig valueobject.KubeRegistryConfig) (string, error)
GetKubeFATEDeploymentYAML returns the default yaml content for deploying KubeFATE
func (*EndpointApp) ScanEndpoint ¶
func (app *EndpointApp) ScanEndpoint(req *EndpointScanRequest) ([]EndpointScanItem, error)
ScanEndpoint returns endpoints installed in an infra provider
type EndpointCreationRequest ¶
type EndpointCreationRequest struct {
EndpointScanRequest
Name string `json:"name"`
Description string `json:"description"`
Install bool `json:"install"`
IngressControllerServiceMode entity.EndpointKubeFATEIngressControllerServiceMode `json:"ingress_controller_service_mode"`
KubeFATEDeploymentYAML string `json:"kubefate_deployment_yaml"`
}
EndpointCreationRequest contains necessary request info to create an endpoint
type EndpointDetail ¶
type EndpointDetail struct {
EndpointListItem
KubeFATEDeploymentYAML string `json:"kubefate_deployment_yaml"`
}
EndpointDetail contains basic information of an endpoint as well as additional information
type EndpointListItem ¶
type EndpointListItem struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Description string `json:"description"`
Type entity.EndpointType `json:"type"`
CreatedAt time.Time `json:"created_at"`
InfraProviderName string `json:"infra_provider_name"`
InfraProviderUUID string `json:"infra_provider_uuid"`
Namespace string `json:"namespace"`
KubeFATEHost string `json:"kubefate_host"`
KubeFATEAddress string `json:"kubefate_address"`
KubeFATEVersion string `json:"kubefate_version"`
Status entity.EndpointStatus `json:"status"`
}
EndpointListItem contains basic information of an endpoint
type EndpointScanItem ¶
type EndpointScanItem struct {
EndpointListItem
IsManaged bool `json:"is_managed"`
IsCompatible bool `json:"is_compatible"`
}
EndpointScanItem contains basic information of an endpoint that is scanned from an infra provider
type EndpointScanRequest ¶
type EndpointScanRequest struct {
InfraProviderUUID string `json:"infra_provider_uuid"`
Type entity.EndpointType `json:"type"`
Namespace string `json:"namespace"`
}
EndpointScanRequest contains necessary request info to start an endpoint scan
type EventApp ¶
type EventApp struct {
EventRepo repo.EventRepository
}
EventApp provide functions to manage the events
func (*EventApp) GetEventList ¶
func (app *EventApp) GetEventList(entity_uuid string) ([]EventListItem, error)
GetEventList returns events of a entity
type EventListItem ¶
type EventListItem struct {
UUID string `json:"uuid"`
Type entity.EventType `json:"type"`
CreatedAt time.Time `json:"created_at"`
EntityUUID string `json:"entity_uuid"`
EntityType entity.EntityType `json:"entity_type"`
Data entity.EventData `json:"data"`
}
EventListItem contains basic information of an event
type FATEClusterDetail ¶
type FATEClusterDetail struct {
ParticipantFATEListItem
DeploymentYAML string `json:"deployment_yaml"`
IngressInfo entity.ParticipantFATEIngressMap `json:"ingress_info"`
PulsarServerCertInfo entity.ParticipantComponentCertInfo `json:"pulsar_server_cert_info"`
SitePortalServerCertInfo entity.ParticipantComponentCertInfo `json:"site_portal_server_cert_info"`
SitePortalClientCertInfo entity.ParticipantComponentCertInfo `json:"site_portal_client_cert_info"`
}
FATEClusterDetail contains the detailed info a FATE cluster
type FATEClusterUpgradeableInfo ¶ added in v0.3.0
type FATEClusterUpgradeableInfo struct {
FATEClusterVersion string `json:"version"`
FATEClusterUpgradeableVersionList `json:"upgradeable_version_list"`
}
type FATEClusterUpgradeableVersionList ¶ added in v0.3.0
type FATEClusterUpgradeableVersionList []string
type FATEExchangeDetail ¶
type FATEExchangeDetail struct {
ParticipantFATEListItem
DeploymentYAML string `json:"deployment_yaml"`
ProxyServerCertInfo entity.ParticipantComponentCertInfo `json:"proxy_server_cert_info"`
FMLManagerServerCertInfo entity.ParticipantComponentCertInfo `json:"fml_manager_server_cert_info"`
FMLManagerClientCertInfo entity.ParticipantComponentCertInfo `json:"fml_manager_client_cert_info"`
}
FATEExchangeDetail contains the detailed info of a FATE exchange
type FederationApp ¶
type FederationApp struct {
FederationFATERepo repo.FederationRepository
ParticipantFATERepo repo.ParticipantFATERepository
FederationOpenFLRepo repo.FederationRepository
ParticipantOpenFLRepo repo.ParticipantOpenFLRepository
RegistrationTokenOpenFLRepo repo.RegistrationTokenRepository
}
FederationApp provides application level API for federation related actions
func (*FederationApp) CreateFATEFederation ¶
func (app *FederationApp) CreateFATEFederation(req *FederationFATECreationRequest) (string, error)
CreateFATEFederation creates a FATE federation
func (*FederationApp) CreateOpenFLFederation ¶
func (app *FederationApp) CreateOpenFLFederation(req *FederationOpenFLCreationRequest) (string, error)
CreateOpenFLFederation creates an OpenFL federation entity
func (*FederationApp) DeleteFATEFederation ¶
func (app *FederationApp) DeleteFATEFederation(uuid string) error
DeleteFATEFederation deletes a FATE federation
func (*FederationApp) DeleteOpenFLFederation ¶
func (app *FederationApp) DeleteOpenFLFederation(uuid string) error
DeleteOpenFLFederation deletes an OpenFL federation
func (*FederationApp) DeleteOpenFLToken ¶
func (app *FederationApp) DeleteOpenFLToken(uuid, federationUUID string) error
DeleteOpenFLToken removes the specified token
func (*FederationApp) GeneratedOpenFLToken ¶
func (app *FederationApp) GeneratedOpenFLToken(req *RegistrationTokenOpenFLBasicInfo, federationUUID string) error
GeneratedOpenFLToken creates a new token for an OpenFL federation
func (*FederationApp) GetFATEFederation ¶
func (app *FederationApp) GetFATEFederation(uuid string) (*FederationFATEDetail, error)
GetFATEFederation returns basic info of a specific FATE federation
func (*FederationApp) GetOpenFLFederation ¶
func (app *FederationApp) GetOpenFLFederation(uuid string) (*FederationOpenFLDetail, error)
GetOpenFLFederation returns basic info of a specific OpenFL federation
func (*FederationApp) List ¶
func (app *FederationApp) List() ([]FederationListItem, error)
List returns all saved federation
func (*FederationApp) ListOpenFLToken ¶
func (app *FederationApp) ListOpenFLToken(federationUUID string) ([]RegistrationTokenOpenFLListItem, error)
ListOpenFLToken list all registration tokens in an OpenFL federation
type FederationCreationRequest ¶
type FederationCreationRequest struct {
Name string `json:"name"`
Description string `json:"description"`
}
FederationCreationRequest contains basic info for creating a federation
type FederationFATECreationRequest ¶
type FederationFATECreationRequest struct {
FederationCreationRequest
Domain string `json:"domain"`
}
FederationFATECreationRequest contains necessary info to create a FATE federation
type FederationFATEDetail ¶
type FederationFATEDetail struct {
FederationListItem
Domain string `json:"domain"`
}
FederationFATEDetail contains specific info for a FATE federation
type FederationListItem ¶
type FederationListItem struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Description string `json:"description"`
Type entity.FederationType `json:"type"`
CreatedAt time.Time `json:"created_at"`
}
FederationListItem contains basic info of a federation
type FederationOpenFLCreationRequest ¶
type FederationOpenFLCreationRequest struct {
FederationCreationRequest
Domain string `json:"domain"`
UseCustomizedShardDescriptor bool `json:"use_customized_shard_descriptor"`
ShardDescriptorConfig *valueobject.ShardDescriptorConfig `json:"shard_descriptor_config"`
}
FederationOpenFLCreationRequest contains necessary info to create an OpenFL federation
type FederationOpenFLDetail ¶
type FederationOpenFLDetail struct {
FederationListItem
Domain string `json:"domain"`
UseCustomizedShardDescriptor bool `json:"use_customized_shard_descriptor"`
ShardDescriptorConfig *valueobject.ShardDescriptorConfig `json:"shard_descriptor_config"`
}
FederationOpenFLDetail contains specific info for an OpenFL federation
type InfraProviderApp ¶
type InfraProviderApp struct {
InfraProviderKubernetesRepo repo.InfraProviderRepository
EndpointKubeFATERepo repo.EndpointRepository
}
InfraProviderApp provide functions to manage the infra providers
func (*InfraProviderApp) CreateProvider ¶
func (app *InfraProviderApp) CreateProvider(providerInfo *InfraProviderCreationRequest) error
CreateProvider creates a provider
func (*InfraProviderApp) DeleteProvider ¶
func (app *InfraProviderApp) DeleteProvider(uuid string) error
DeleteProvider deletes a provider
func (*InfraProviderApp) GetProviderDetail ¶
func (app *InfraProviderApp) GetProviderDetail(uuid string) (*InfraProviderDetail, error)
GetProviderDetail returns detailed info of a provider
func (*InfraProviderApp) GetProviderList ¶
func (app *InfraProviderApp) GetProviderList() ([]InfraProviderListItem, error)
GetProviderList returns provider list
func (*InfraProviderApp) TestKubernetesConnection ¶
func (app *InfraProviderApp) TestKubernetesConnection(kubeconfig *valueobject.KubeConfig) error
TestKubernetesConnection validates the connection to the kubernetes cluster
func (*InfraProviderApp) UpdateProvider ¶
func (app *InfraProviderApp) UpdateProvider(uuid string, updateProviderInfo *InfraProviderUpdateRequest) error
UpdateProvider changes provider settings
type InfraProviderCreationRequest ¶
type InfraProviderCreationRequest struct {
InfraProviderEditableItem
KubernetesProviderInfo InfraProviderKubernetesConfig `json:"kubernetes_provider_info"`
}
InfraProviderCreationRequest represents a request to create an infra provider
type InfraProviderDetail ¶
type InfraProviderDetail struct {
InfraProviderItemBase
KubernetesProviderInfo InfraProviderInfoKubernetes `json:"kubernetes_provider_info"`
}
InfraProviderDetail contains details info of a provider
type InfraProviderEditableItem ¶
type InfraProviderEditableItem struct {
Name string `json:"name"`
Description string `json:"description"`
Type entity.InfraProviderType `json:"type"`
}
InfraProviderEditableItem contains properties of a provider that should be provided by the user
type InfraProviderInfoKubernetes ¶
type InfraProviderInfoKubernetes struct {
InfraProviderListItemKubernetes
InfraProviderKubernetesConfig
}
InfraProviderInfoKubernetes contains information specific to kubernetes provider
type InfraProviderItemBase ¶
type InfraProviderItemBase struct {
InfraProviderEditableItem
UUID string `json:"uuid"`
CreatedAt time.Time `json:"created_at"`
}
InfraProviderItemBase is the base data structure item
type InfraProviderKubernetesConfig ¶
type InfraProviderKubernetesConfig struct {
KubeConfig string `json:"kubeconfig_content"`
Namespaces []string `json:"namespaces_list"`
IsInCluster bool `json:"is_in_cluster"`
RegistryConfigFATE valueobject.KubeRegistryConfig `json:"registry_config_fate"`
}
InfraProviderKubernetesConfig contains kubernetes provider details properties
type InfraProviderListItem ¶
type InfraProviderListItem struct {
InfraProviderItemBase
KubernetesProviderInfo InfraProviderListItemKubernetes `json:"kubernetes_provider_info"`
}
InfraProviderListItem is an item for listing the providers
type InfraProviderListItemKubernetes ¶
type InfraProviderListItemKubernetes struct {
APIServer string `json:"api_server"`
}
InfraProviderListItemKubernetes contains list info related to a kubernetes infra provider
type InfraProviderUpdateRequest ¶
type InfraProviderUpdateRequest struct {
InfraProviderEditableItem
KubernetesProviderInfo InfraProviderKubernetesConfig `json:"kubernetes_provider_info"`
}
InfraProviderUpdateRequest represents a request to update an infra provider
type OpenFLDirectorDetail ¶
type OpenFLDirectorDetail struct {
ParticipantOpenFLListItem
ChartUUID string `json:"chart_uuid"`
DeploymentYAML string `json:"deployment_yaml"`
DirectorServerCertInfo entity.ParticipantComponentCertInfo `json:"director_server_cert_info"`
JupyterClientCertInfo entity.ParticipantComponentCertInfo `json:"jupyter_client_cert_info"`
}
OpenFLDirectorDetail contains detailed info of an OpenFL director
type OpenFLEnvoyDetail ¶
type OpenFLEnvoyDetail struct {
ParticipantOpenFLListItem
ChartUUID string `json:"chart_uuid"`
EnvoyClientCertInfo entity.ParticipantComponentCertInfo `json:"envoy_client_cert_info"`
}
OpenFLEnvoyDetail contains detailed info of an OpenFL envoy
type ParticipantApp ¶
type ParticipantApp struct {
ParticipantFATERepo repo.ParticipantFATERepository
FederationFATERepo repo.FederationRepository
FederationOpenFLRepo repo.FederationRepository
ParticipantOpenFLRepo repo.ParticipantOpenFLRepository
RegistrationTokenOpenFLRepo repo.RegistrationTokenRepository
EndpointKubeFATERepo repo.EndpointRepository
InfraProviderKubernetesRepo repo.InfraProviderRepository
ChartRepo repo.ChartRepository
CertificateAuthorityRepo repo.CertificateAuthorityRepository
CertificateRepo repo.CertificateRepository
CertificateBindingRepo repo.CertificateBindingRepository
EventRepo repo.EventRepository
}
ParticipantApp provide functions to manage the participants
func (*ParticipantApp) CheckFATPartyID ¶
func (app *ParticipantApp) CheckFATPartyID(federationUUID string, partyID int) error
CheckFATPartyID returns error if the current party id is taken in the specified federation
func (*ParticipantApp) CreateExternalFATECluster ¶
func (app *ParticipantApp) CreateExternalFATECluster(req *service.ParticipantFATEExternalClusterCreationRequest) (string, error)
CreateExternalFATECluster creates an external FATE cluster
func (*ParticipantApp) CreateExternalFATEExchange ¶
func (app *ParticipantApp) CreateExternalFATEExchange(req *service.ParticipantFATEExternalExchangeCreationRequest) (string, error)
CreateExternalFATEExchange creates an external FATE exchange
func (*ParticipantApp) CreateFATECluster ¶
func (app *ParticipantApp) CreateFATECluster(req *service.ParticipantFATEClusterCreationRequest) (string, error)
CreateFATECluster creates a FATE cluster using the specified endpoint
func (*ParticipantApp) CreateFATEExchange ¶
func (app *ParticipantApp) CreateFATEExchange(req *service.ParticipantFATEExchangeCreationRequest) (string, error)
CreateFATEExchange creates a FATE exchange using the specified endpoint
func (*ParticipantApp) CreateOpenFLDirector ¶
func (app *ParticipantApp) CreateOpenFLDirector(req *service.ParticipantOpenFLDirectorCreationRequest) (string, error)
CreateOpenFLDirector creates an OpenFL director using the specified endpoint
func (*ParticipantApp) GetFATEClusterDeploymentYAML ¶
func (app *ParticipantApp) GetFATEClusterDeploymentYAML(req *service.ParticipantFATEClusterYAMLCreationRequest) (string, error)
GetFATEClusterDeploymentYAML returns the deployment yaml for a FATE cluster
func (*ParticipantApp) GetFATEClusterDetail ¶
func (app *ParticipantApp) GetFATEClusterDetail(uuid string) (*FATEClusterDetail, error)
GetFATEClusterDetail returns detailed info of a exchange or cluster
func (*ParticipantApp) GetFATEClusterUpgrade ¶ added in v0.3.0
func (app *ParticipantApp) GetFATEClusterUpgrade(ClisterUUID string) (*FATEClusterUpgradeableInfo, error)
func (*ParticipantApp) GetFATEExchangeDeploymentYAML ¶
func (app *ParticipantApp) GetFATEExchangeDeploymentYAML(req *service.ParticipantFATEExchangeYAMLCreationRequest) (string, error)
GetFATEExchangeDeploymentYAML returns the deployment yaml for a FATE exchange
func (*ParticipantApp) GetFATEExchangeDetail ¶
func (app *ParticipantApp) GetFATEExchangeDetail(uuid string) (*FATEExchangeDetail, error)
GetFATEExchangeDetail returns detailed info of a exchange
func (*ParticipantApp) GetFATEExchangeUpgrade ¶ added in v0.3.0
func (app *ParticipantApp) GetFATEExchangeUpgrade(ExchangeUUID string) (*FATEClusterUpgradeableInfo, error)
func (*ParticipantApp) GetFATEParticipantList ¶
func (app *ParticipantApp) GetFATEParticipantList(federationUUID string) (*ParticipantFATEListInFederation, error)
GetFATEParticipantList returns the current participants in a FATE federation
func (*ParticipantApp) GetOpenFLDirectorDeploymentYAML ¶
func (app *ParticipantApp) GetOpenFLDirectorDeploymentYAML(req *service.ParticipantOpenFLDirectorYAMLCreationRequest) (string, error)
GetOpenFLDirectorDeploymentYAML returns the deployment yaml for an OpenFL director
func (*ParticipantApp) GetOpenFLDirectorDetail ¶
func (app *ParticipantApp) GetOpenFLDirectorDetail(uuid string) (*OpenFLDirectorDetail, error)
GetOpenFLDirectorDetail returns the detailed information of a OpenFL director
func (*ParticipantApp) GetOpenFLEnvoyDetail ¶
func (app *ParticipantApp) GetOpenFLEnvoyDetail(uuid string) (*OpenFLEnvoyDetail, error)
GetOpenFLEnvoyDetail returns the detailed information of a OpenFL envoy
func (*ParticipantApp) GetOpenFLEnvoyDetailWithTokenVerification ¶
func (app *ParticipantApp) GetOpenFLEnvoyDetailWithTokenVerification(uuid, tokenStr string) (*OpenFLEnvoyDetail, error)
GetOpenFLEnvoyDetailWithTokenVerification returns the detailed information of a OpenFL envoy if the supplied token string is correct
func (*ParticipantApp) GetOpenFLParticipantList ¶
func (app *ParticipantApp) GetOpenFLParticipantList(federationUUID string) (*ParticipantOpenFLListInFederation, error)
GetOpenFLParticipantList returns the current participants in an OpenFL federation
func (*ParticipantApp) HandleOpenFLEnvoyRegistration ¶
func (app *ParticipantApp) HandleOpenFLEnvoyRegistration(req *service.ParticipantOpenFLEnvoyRegistrationRequest) (string, error)
HandleOpenFLEnvoyRegistration handles registration request from an Envoy node
func (*ParticipantApp) RemoveFATECluster ¶
func (app *ParticipantApp) RemoveFATECluster(uuid string, force bool) error
RemoveFATECluster removes and uninstalls a FATE cluster deployment
func (*ParticipantApp) RemoveFATEExchange ¶
func (app *ParticipantApp) RemoveFATEExchange(uuid string, force bool) error
RemoveFATEExchange removes and uninstalls a FATE exchange deployment
func (*ParticipantApp) RemoveOpenFLDirector ¶
func (app *ParticipantApp) RemoveOpenFLDirector(uuid string, force bool) error
RemoveOpenFLDirector removes and uninstalls an OpenFL director deployment
func (*ParticipantApp) RemoveOpenFLEnvoy ¶
func (app *ParticipantApp) RemoveOpenFLEnvoy(uuid string, force bool) error
RemoveOpenFLEnvoy removes and uninstalls an OpenFL envoy deployment
func (*ParticipantApp) UpgradeFATECluster ¶ added in v0.3.0
func (app *ParticipantApp) UpgradeFATECluster(req *service.ParticipantFATEClusterUpgradeRequest) (string, error)
func (*ParticipantApp) UpgradeFATEExchange ¶ added in v0.3.0
func (app *ParticipantApp) UpgradeFATEExchange(req *service.ParticipantFATEExchangeUpgradeRequest) (string, error)
type ParticipantFATEListInFederation ¶
type ParticipantFATEListInFederation struct {
Exchange *ParticipantFATEListItem `json:"exchange"`
Clusters []*ParticipantFATEListItem `json:"clusters"`
}
ParticipantFATEListInFederation has all the participants in a FATE federation
type ParticipantFATEListItem ¶
type ParticipantFATEListItem struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Description string `json:"description"`
CreatedAt time.Time `json:"created_at"`
Type entity.ParticipantFATEType `json:"type"`
EndpointName string `json:"endpoint_name"`
EndpointUUID string `json:"endpoint_uuid"`
InfraProviderName string `json:"infra_provider_name"`
InfraProviderUUID string `json:"infra_provider_uuid"`
ChartUUID string `json:"chart_uuid"`
Version string `json:"version"`
Namespace string `json:"namespace"`
PartyID int `json:"party_id"`
ClusterUUID string `json:"cluster_uuid"`
Upgradeable bool `json:"upgradeable"`
Status entity.ParticipantFATEStatus `json:"status"`
AccessInfo entity.ParticipantFATEModulesAccessMap `json:"access_info"`
IsManaged bool `json:"is_managed"`
}
ParticipantFATEListItem contains basic information of a FATE participant
type ParticipantOpenFLListInFederation ¶
type ParticipantOpenFLListInFederation struct {
Director *ParticipantOpenFLListItem `json:"director"`
Envoy []*ParticipantOpenFLListItem `json:"envoy"`
}
ParticipantOpenFLListInFederation contains all the participants in an OpenFL federation
type ParticipantOpenFLListItem ¶
type ParticipantOpenFLListItem struct {
UUID string `json:"uuid"`
Name string `json:"name"`
Description string `json:"description"`
CreatedAt time.Time `json:"created_at"`
Type entity.ParticipantOpenFLType `json:"type"`
EndpointName string `json:"endpoint_name"`
EndpointUUID string `json:"endpoint_uuid"`
InfraProviderName string `json:"infra_provider_name"`
InfraProviderUUID string `json:"infra_provider_uuid"`
Namespace string `json:"namespace"`
ClusterUUID string `json:"cluster_uuid"`
Status entity.ParticipantOpenFLStatus `json:"status"`
AccessInfo entity.ParticipantOpenFLModulesAccessMap `json:"access_info"`
TokenStr string `json:"token_str"`
TokenName string `json:"token_name"`
Labels valueobject.Labels `json:"labels"`
}
ParticipantOpenFLListItem contains basic info of an OpenFL participant
type PublicUser ¶
PublicUser represents a user info viewable to the public
type PwdChangeInfo ¶
type PwdChangeInfo struct {
CurPassword string `json:"cur_password"`
NewPassword string `json:"new_password"`
}
PwdChangeInfo represents fields related with login
type RegistrationTokenOpenFLBasicInfo ¶
type RegistrationTokenOpenFLBasicInfo struct {
Name string `json:"name"`
Description string `json:"description"`
ExpiredAt time.Time `json:"expired_at"`
Limit int `json:"limit"`
Used int `json:"used"`
Labels valueobject.Labels `json:"labels"`
}
RegistrationTokenOpenFLBasicInfo contains necessary info to generate token for an OpenFL federation
type RegistrationTokenOpenFLListItem ¶
type RegistrationTokenOpenFLListItem struct {
RegistrationTokenOpenFLBasicInfo
UUID string `json:"uuid"`
DisplayedTokenStr string `json:"token_str"`
}
type UserApp ¶
type UserApp struct {
UserRepo repo.UserRepository
}
UserApp provides user management service
func (*UserApp) Login ¶
func (app *UserApp) Login(info *LoginInfo) (*PublicUser, error)
Login validates the loginInfo and returns a publicUser object on success
func (*UserApp) UpdateUserPassword ¶
func (app *UserApp) UpdateUserPassword(userId int, info *PwdChangeInfo) error
UpdateUserPassword changes user's password