repository

package
v0.8.1 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package repository implements different repository services required by the edge-cluster service

Package repository implements different repository services required by the edge-cluster service

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateEdgeClusterRequest

type CreateEdgeClusterRequest struct {
	UserEmail   string
	EdgeCluster models.EdgeCluster
}

CreateEdgeClusterRequest contains the request to create a new edge cluster

type CreateEdgeClusterResponse

type CreateEdgeClusterResponse struct {
	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
}

DeleteEdgeClusterRequest contains the request to delete an existing edge cluster

type DeleteEdgeClusterResponse

type DeleteEdgeClusterResponse struct {
}

DeleteEdgeClusterResponse contains the result of deleting an existing edge cluster

type ReadEdgeClusterRequest

type ReadEdgeClusterRequest struct {
	UserEmail     string
	EdgeClusterID string
}

ReadEdgeClusterRequest contains the request to read an existing edge cluster

type ReadEdgeClusterResponse

type ReadEdgeClusterResponse struct {
	EdgeCluster models.EdgeCluster
}

ReadEdgeClusterResponse contains the result of reading an existing edge cluster

type RepositoryContract

type RepositoryContract 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 esiting 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 esiting 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 esiting 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)

	// 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)
}

RepositoryContract declares the repository service that can create new edge cluster, read, update and delete existing edge clusters.

type SearchRequest added in v0.0.10

type SearchRequest struct {
	UserEmail      string
	Pagination     common.Pagination
	SortingOptions []common.SortingOptionPair
	EdgeClusterIDs []string
	ProjectIDs     []string
}

SearchRequest contains the filter criteria to look for existing projects

type SearchResponse added in v0.0.10

type SearchResponse struct {
	HasPreviousPage bool
	HasNextPage     bool
	TotalCount      int64
	EdgeClusters    []models.EdgeClusterWithCursor
}

SearchResponse contains the list of the projects that matched the result

type UpdateEdgeClusterRequest

type UpdateEdgeClusterRequest struct {
	UserEmail     string
	EdgeClusterID string
	EdgeCluster   models.EdgeCluster
}

UpdateEdgeClusterRequest contains the request to update an existing edge cluster

type UpdateEdgeClusterResponse

type UpdateEdgeClusterResponse struct {
	EdgeCluster models.EdgeCluster
	Cursor      string
}

UpdateEdgeClusterResponse contains the result of updating an existing edge cluster

Directories

Path Synopsis
Package mock_repository is a generated GoMock package.
Package mock_repository is a generated GoMock package.
Package mongodb implements MongoDB repository services
Package mongodb implements MongoDB repository services

Jump to

Keyboard shortcuts

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