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 ¶
Package business implements different business services required by the edge-cluster service
Index ¶
- func IsEdgeClusterAlreadyExistsError(err error) bool
- func IsEdgeClusterNotFoundError(err error) bool
- func IsUnknownError(err error) bool
- func NewEdgeClusterAlreadyExistsError() error
- func NewEdgeClusterAlreadyExistsErrorWithError(err error) error
- func NewEdgeClusterNotFoundError(edgeClusterID string) error
- func NewEdgeClusterNotFoundErrorWithError(edgeClusterID string, err error) error
- func NewUnknownError(message string) error
- func NewUnknownErrorWithError(message string, err error) error
- type BusinessContract
- type CreateEdgeClusterRequest
- type CreateEdgeClusterResponse
- type DeleteEdgeClusterRequest
- type DeleteEdgeClusterResponse
- type EdgeClusterAlreadyExistsError
- type EdgeClusterNotFoundError
- type ReadEdgeClusterRequest
- type ReadEdgeClusterResponse
- type SearchRequest
- type SearchResponse
- type UnknownError
- type UpdateEdgeClusterRequest
- type UpdateEdgeClusterResponse
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsEdgeClusterAlreadyExistsError ¶
IsEdgeClusterAlreadyExistsError indicates whether the error is of type EdgeClusterAlreadyExistsError
func IsEdgeClusterNotFoundError ¶
IsEdgeClusterNotFoundError indicates whether the error is of type EdgeClusterNotFoundError
func IsUnknownError ¶
IsUnknownError indicates whether the error is of type UnknownError
func NewEdgeClusterAlreadyExistsError ¶
func NewEdgeClusterAlreadyExistsError() error
NewEdgeClusterAlreadyExistsError creates a new EdgeClusterAlreadyExistsError error
func NewEdgeClusterAlreadyExistsErrorWithError ¶
NewEdgeClusterAlreadyExistsErrorWithError creates a new EdgeClusterAlreadyExistsError error
func NewEdgeClusterNotFoundError ¶
NewEdgeClusterNotFoundError creates a new EdgeClusterNotFoundError error edgeClusterID: Mandatory. The edge clusterID that did not match any existing edge cluster
func NewEdgeClusterNotFoundErrorWithError ¶
NewEdgeClusterNotFoundErrorWithError creates a new EdgeClusterNotFoundError error edgeClusterID: Mandatory. The edge clusterID that did not match any existing edge cluster
func NewUnknownError ¶
NewUnknownError creates a new UnknownError error
func NewUnknownErrorWithError ¶
NewUnknownErrorWithError creates a new UnknownError error
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 exiting 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 exiting 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 exiting edge cluster or error if something goes wrong. DeleteEdgeCluster( ctx context.Context, request *DeleteEdgeClusterRequest) (*DeleteEdgeClusterResponse, error) // Search 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 Search( ctx context.Context, request *SearchRequest) (*SearchResponse, error) }
BusinessContract declares the service that can create new edge cluster, read, update and delete existing edge clusters.
func NewBusinessService ¶
func NewBusinessService( 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 Returns the new service or error if something goes wrong
type CreateEdgeClusterRequest ¶
type CreateEdgeClusterRequest struct {
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 { 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 EdgeClusterAlreadyExistsError ¶
type EdgeClusterAlreadyExistsError struct {
Err error
}
EdgeClusterAlreadyExistsError indicates that the edge cluster with the given information already exists
func (EdgeClusterAlreadyExistsError) Error ¶
func (e EdgeClusterAlreadyExistsError) Error() string
Error returns message for the EdgeClusterAlreadyExistsError error type Returns the error nessage
func (EdgeClusterAlreadyExistsError) Unwrap ¶
func (e EdgeClusterAlreadyExistsError) Unwrap() error
Unwrap returns the err if provided through NewEdgeClusterAlreadyExistsErrorWithError function, otherwise returns nil
type EdgeClusterNotFoundError ¶
EdgeClusterNotFoundError indicates that the edge cluster with the given edge cluster ID does not exist
func (EdgeClusterNotFoundError) Error ¶
func (e EdgeClusterNotFoundError) Error() string
Error returns message for the EdgeClusterNotFoundError error type Returns the error nessage
func (EdgeClusterNotFoundError) Unwrap ¶
func (e EdgeClusterNotFoundError) Unwrap() error
Unwrap returns the err if provided through NewEdgeClusterNotFoundErrorWithError function, otherwise returns nil
type ReadEdgeClusterRequest ¶
type ReadEdgeClusterRequest struct {
EdgeClusterID string
}
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 }
ReadEdgeClusterResponse contains the result of reading an existing edge cluster
type SearchRequest ¶ added in v0.0.10
type SearchRequest struct { Pagination common.Pagination SortingOptions []common.SortingOptionPair EdgeClusterIDs []string TenantIDs []string }
SearchRequest contains the filter criteria to look for existing edge clusters
func (SearchRequest) Validate ¶ added in v0.0.10
func (val SearchRequest) Validate() error
Validate validates the SearchRequest model and return error if the validation failes Returns error if validation failes
type SearchResponse ¶ added in v0.0.10
type SearchResponse struct { Err error HasPreviousPage bool HasNextPage bool TotalCount int64 EdgeClusters []models.EdgeClusterWithCursor }
SearchResponse contains the list of the edge clusters that matched the result
type UnknownError ¶
UnknownError indicates that an unknown error has happened<Paste>
func (UnknownError) Error ¶
func (e UnknownError) Error() string
Error returns message for the UnknownError error type Returns the error nessage
func (UnknownError) Unwrap ¶
func (e UnknownError) Unwrap() error
Unwrap returns the err if provided through NewUnknownErrorWithError function, otherwise returns nil
type UpdateEdgeClusterRequest ¶
type UpdateEdgeClusterRequest struct { 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