...

Source file src/edge-infra.dev/pkg/edge/api/fake/mocks/clusters.go

Documentation: edge-infra.dev/pkg/edge/api/fake/mocks

     1  package mocks
     2  
     3  import "edge-infra.dev/pkg/edge/api/graph/model"
     4  
     5  type Cluster struct {
     6  	ClusterEdgeID          string                             `graphql:"clusterEdgeId" json:"clusterEdgeId"`
     7  	Name                   string                             `graphql:"name" json:"name"`
     8  	ClusterNetworkServices []*model.ClusterNetworkServiceInfo `graphql:"clusterNetworkServices" json:"clusterNetworkServices"`
     9  }
    10  type ClustersResponse struct {
    11  	Clusters []*Cluster `json:"clusters"`
    12  }
    13  
    14  func Clusters() *ClustersResponse {
    15  	priorityValue := 80
    16  	return &ClustersResponse{
    17  		Clusters: []*Cluster{
    18  			{
    19  				Name:          "test-cluster-0",
    20  				ClusterEdgeID: "test-cluster-edge-id-0",
    21  				ClusterNetworkServices: []*model.ClusterNetworkServiceInfo{
    22  					{
    23  						NetworkServiceID: "test-networkservice-id-0",
    24  						ServiceType:      "dns",
    25  						IP:               "1.1.1.1",
    26  						Priority:         &priorityValue,
    27  					},
    28  				},
    29  			},
    30  		},
    31  	}
    32  }
    33  

View as plain text