Documentation ¶
Overview ¶
Package business implements different business services required by the edge-cluster service
Package business implements different business services required by the edge-cluster service ¶
Package business implements different business services required by the edge-cluster service ¶
Package business implements different business services required by the edge-cluster service
Index ¶
- type BusinessContract
- type CreateEdgeClusterRequest
- type CreateEdgeClusterResponse
- type DeleteEdgeClusterRequest
- type DeleteEdgeClusterResponse
- type ListEdgeClusterNodesRequest
- type ListEdgeClusterNodesResponse
- type ListEdgeClusterPodsRequest
- type ListEdgeClusterPodsResponse
- type ListEdgeClusterServicesRequest
- type ListEdgeClusterServicesResponse
- type ListEdgeClustersRequest
- type ListEdgeClustersResponse
- type ReadEdgeClusterRequest
- type ReadEdgeClusterResponse
- type UpdateEdgeClusterRequest
- type UpdateEdgeClusterResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BusinessContract ¶
type BusinessContract interface { // CreateEdgeCluster creates a new edge cluster. // context: Mandatory The reference to the context // request: Mandatory. The request to create a new edge cluster // Returns either the result of creating new edge cluster or error if something goes wrong. CreateEdgeCluster( ctx context.Context, request *CreateEdgeClusterRequest) (*CreateEdgeClusterResponse, error) // ReadEdgeCluster read an existing edge cluster // context: Mandatory The reference to the context // request: Mandatory. The request to read an existing edge cluster // Returns either the result of reading an existing edge cluster or error if something goes wrong. ReadEdgeCluster( ctx context.Context, request *ReadEdgeClusterRequest) (*ReadEdgeClusterResponse, error) // UpdateEdgeCluster update an existing edge cluster // context: Mandatory The reference to the context // request: Mandatory. The request to update an existing edge cluster // Returns either the result of updateing an existing edge cluster or error if something goes wrong. UpdateEdgeCluster( ctx context.Context, request *UpdateEdgeClusterRequest) (*UpdateEdgeClusterResponse, error) // DeleteEdgeCluster delete an existing edge cluster // context: Mandatory The reference to the context // request: Mandatory. The request to delete an existing edge cluster // Returns either the result of deleting an existing edge cluster or error if something goes wrong. DeleteEdgeCluster( ctx context.Context, request *DeleteEdgeClusterRequest) (*DeleteEdgeClusterResponse, error) // ListEdgeClusters returns the list of edge clusters that matched the criteria // ctx: Mandatory The reference to the context // request: Mandatory. The request contains the search criteria // Returns the list of edge clusters that matched the criteria ListEdgeClusters( ctx context.Context, request *ListEdgeClustersRequest) (*ListEdgeClustersResponse, error) // ListEdgeClusterNodes lists an existing edge cluster nodes details // ctx: Mandatory The reference to the context // request: Mandatory. The request to list an existing edge cluster nodes details // Returns an existing edge cluster nodes details or error if something goes wrong. ListEdgeClusterNodes( ctx context.Context, request *ListEdgeClusterNodesRequest) (*ListEdgeClusterNodesResponse, error) // ListEdgeClusterPods lists an existing edge cluster pods details // ctx: Mandatory The reference to the context // request: Mandatory. The request to list an existing edge cluster pods details // Returns an existing edge cluster pods details or error if something goes wrong. ListEdgeClusterPods( ctx context.Context, request *ListEdgeClusterPodsRequest) (*ListEdgeClusterPodsResponse, error) // ListEdgeClusterServices lists an existing edge cluster services details // ctx: Mandatory The reference to the context // request: Mandatory. The request to list an existing edge cluster services details // Returns an existing edge cluster services details or error if something goes wrong. ListEdgeClusterServices( ctx context.Context, request *ListEdgeClusterServicesRequest) (*ListEdgeClusterServicesResponse, error) }
BusinessContract declares the service that can create new edge cluster, read, update and delete existing edge clusters.
func NewBusinessService ¶
func NewBusinessService( logger *zap.Logger, repositoryService repository.RepositoryContract, edgeClusterFactoryService edgeClusterTypes.EdgeClusterFactoryContract) (BusinessContract, error)
NewBusinessService creates new instance of the BusinessService, setting up all dependencies and returns the instance repositoryService: Mandatory. Reference to the repository service that can persist the edge cluster related data edgeClusterFactoryService: Mandatory. Reference to the factory service that can that can create different type of supported edge cluster provisioner logger: Mandatory. Reference to the logger service Returns the new service or error if something goes wrong
type CreateEdgeClusterRequest ¶
type CreateEdgeClusterRequest struct { UserEmail string EdgeCluster models.EdgeCluster }
CreateEdgeClusterRequest contains the request to create a new edge cluster
func (CreateEdgeClusterRequest) Validate ¶
func (val CreateEdgeClusterRequest) Validate() error
Validate validates the CreateEdgeClusterRequest model and return error if the validation failes Returns error if validation failes
type CreateEdgeClusterResponse ¶
type CreateEdgeClusterResponse struct { Err error EdgeClusterID string EdgeCluster models.EdgeCluster Cursor string }
CreateEdgeClusterResponse contains the result of creating a new edge cluster
type DeleteEdgeClusterRequest ¶
type DeleteEdgeClusterRequest struct { UserEmail string EdgeClusterID string EdgeCluster models.EdgeCluster }
DeleteEdgeClusterRequest contains the request to delete an existing edge cluster
func (DeleteEdgeClusterRequest) Validate ¶
func (val DeleteEdgeClusterRequest) Validate() error
Validate validates the DeleteEdgeClusterRequest model and return error if the validation failes Returns error if validation failes
type DeleteEdgeClusterResponse ¶
type DeleteEdgeClusterResponse struct {
Err error
}
DeleteEdgeClusterResponse contains the result of deleting an existing edge cluster
type ListEdgeClusterNodesRequest ¶ added in v0.5.4
ListEdgeClusterNodesRequest contains the request to list an existing edge cluster nodes details
func (ListEdgeClusterNodesRequest) Validate ¶ added in v0.5.4
func (val ListEdgeClusterNodesRequest) Validate() error
Validate validates the ListEdgeClusterNodesRequest model and return error if the validation failes Returns error if validation failes
type ListEdgeClusterNodesResponse ¶ added in v0.5.4
type ListEdgeClusterNodesResponse struct { Err error Nodes []models.EdgeClusterNode }
ListEdgeClusterNodesResponse contains the result of listing an existing edge cluster nodes details
type ListEdgeClusterPodsRequest ¶ added in v0.8.0
type ListEdgeClusterPodsRequest struct { UserEmail string EdgeClusterID string Namespace string NodeName string }
ListEdgeClusterPodsRequest contains the request to list an existing edge cluster pods details
func (ListEdgeClusterPodsRequest) Validate ¶ added in v0.8.0
func (val ListEdgeClusterPodsRequest) Validate() error
Validate validates the ListEdgeClusterPodsRequest model and return error if the validation failes Returns error if validation failes
type ListEdgeClusterPodsResponse ¶ added in v0.8.0
type ListEdgeClusterPodsResponse struct { Err error Pods []models.EdgeClusterPod }
ListEdgeClusterPodsResponse contains the result of listing an existing edge cluster pods details
type ListEdgeClusterServicesRequest ¶ added in v0.9.0
type ListEdgeClusterServicesRequest struct { UserEmail string EdgeClusterID string Namespace string }
ListEdgeClusterServicesRequest contains the request to list an existing edge cluster services details
func (ListEdgeClusterServicesRequest) Validate ¶ added in v0.9.0
func (val ListEdgeClusterServicesRequest) Validate() error
Validate validates the ListEdgeClusterServicesRequest model and return error if the validation failes Returns error if validation failes
type ListEdgeClusterServicesResponse ¶ added in v0.9.0
type ListEdgeClusterServicesResponse struct { Err error Services []models.EdgeClusterService }
ListEdgeClusterServicesResponse contains the result of listing an existing edge cluster services details
type ListEdgeClustersRequest ¶ added in v0.9.0
type ListEdgeClustersRequest struct { UserEmail string Pagination common.Pagination SortingOptions []common.SortingOptionPair EdgeClusterIDs []string ProjectIDs []string }
ListEdgeClustersRequest contains the filter criteria to look for existing edge clusters
func (ListEdgeClustersRequest) Validate ¶ added in v0.9.0
func (val ListEdgeClustersRequest) Validate() error
Validate validates the ListEdgeClustersRequest model and return error if the validation failes Returns error if validation failes
type ListEdgeClustersResponse ¶ added in v0.9.0
type ListEdgeClustersResponse struct { Err error HasPreviousPage bool HasNextPage bool TotalCount int64 EdgeClusters []models.EdgeClusterWithCursor }
ListEdgeClustersResponse contains the list of the edge clusters that matched the result
type ReadEdgeClusterRequest ¶
ReadEdgeClusterRequest contains the request to read an existing edge cluster
func (ReadEdgeClusterRequest) Validate ¶
func (val ReadEdgeClusterRequest) Validate() error
Validate validates the ReadEdgeClusterRequest model and return error if the validation failes Returns error if validation failes
type ReadEdgeClusterResponse ¶
type ReadEdgeClusterResponse struct { Err error EdgeCluster models.EdgeCluster ProvisionDetails models.ProvisionDetails }
ReadEdgeClusterResponse contains the result of reading an existing edge cluster
type UpdateEdgeClusterRequest ¶
type UpdateEdgeClusterRequest struct { UserEmail string EdgeClusterID string EdgeCluster models.EdgeCluster }
UpdateEdgeClusterRequest contains the request to update an existing edge cluster
func (UpdateEdgeClusterRequest) Validate ¶
func (val UpdateEdgeClusterRequest) Validate() error
Validate validates the UpdateEdgeClusterRequest model and return error if the validation failes Returns error if validation failes
type UpdateEdgeClusterResponse ¶
type UpdateEdgeClusterResponse struct { Err error EdgeCluster models.EdgeCluster Cursor string }
UpdateEdgeClusterResponse contains the result of updating an existing edge cluster