argo-web-api: github.com/ARGOeu/argo-web-api/app/aggregationProfiles Index | Files

package aggregationProfiles

import "github.com/ARGOeu/argo-web-api/app/aggregationProfiles"

Index

Package Files

controller.go model.go routing.go view.go

func Create Uses

func Create(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)

Create a new metric profile

func Delete Uses

func Delete(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)

Delete metric profile based on id

func HandleSubrouter Uses

func HandleSubrouter(s *mux.Router, confhandler *respond.ConfHandler)

HandleSubrouter uses the subrouter for a specific calls and creates a tree of sorts handling each route with a different subrouter

func List Uses

func List(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)

List the existing aggregation profiles for the tenant making the request Also there is an optional url param "name" to filter results by

func ListOne Uses

func ListOne(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)

ListOne handles the listing of one specific profile based on its given id

func Options Uses

func Options(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)

Options implements the http option request

func Update Uses

func Update(r *http.Request, cfg config.Config) (int, http.Header, []byte, error)

Update function to update contents of an existing aggregation profile

type AggProfile Uses

type AggProfile struct {
    ID            string        `bson:"id" json:"id"`
    DateInt       int           `bson:"date_integer" json:"-"`
    Date          string        `bson:"date" json:"date"`
    Name          string        `bson:"name" json:"name"`
    Namespace     string        `bson:"namespace" json:"namespace"`
    EndpointGroup string        `bson:"endpoint_group" json:"endpoint_group"`
    MetricOp      string        `bson:"metric_operation" json:"metric_operation"`
    ProfileOp     string        `bson:"profile_operation" json:"profile_operation"`
    MetricProf    MetricProfile `bson:"metric_profile" json:"metric_profile"`
    Groups        []Group       `bson:"groups" json:"groups"`
}

AggProfile struct to retrieve and insert aggregation profiles in mongo

type Group Uses

type Group struct {
    Name     string    `bson:"name" json:"name"`
    Op       string    `bson:"operation" json:"operation"`
    Services []Service `bson:"services" json:"services"`
}

Group struct to represent groupings

type Links struct {
    Self string `json:"self"`
}

Links struct to hold links

type MetricProfile Uses

type MetricProfile struct {
    Name string `bson:"name" json:"name"`
    ID   string `bson:"id" json:"id"`
}

MetricProfile is just a reference struct holding the name and the uuid of the profile

type SelfReference Uses

type SelfReference struct {
    ID    string `json:"id" bson:"id,omitempty"`
    Links Links  `json:"links"`
}

SelfReference to hold links and uuid

type Service Uses

type Service struct {
    Name string `bson:"name" json:"name"`
    Op   string `bson:"operation" json:"operation"`
}

Service struct hold information about service operations

Package aggregationProfiles imports 15 packages (graph) and is imported by 3 packages. Updated 2020-07-14. Refresh now. Tools for package owners.