argo-web-api: Index | Files

package operationsProfiles

import ""


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 metric 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)

func Update Uses

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

Update function to update contents of an existing metric profile

type DefaultStates Uses

type DefaultStates struct {
    Down    string `bson:"down" json:"down"`
    Missing string `bson:"missing" json:"missing"`
    Unknown string `bson:"unknown" json:"unknown"`

DefaultStates struct to represent defaults states

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

Links struct to hold links

type Operation Uses

type Operation struct {
    Name       string      `bson:"name" json:"name"`
    TruthTable []Statement `bson:"truth_table" json:"truth_table"`

Operation struct to represent an operation

type OpsProfile Uses

type OpsProfile 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"`
    AvailStates []string      `bson:"available_states" json:"available_states"`
    Defaults    DefaultStates `bson:"defaults" json:"defaults"`
    Operations  []Operation   `bson:"operations" json:"operations"`

OpsProfile to retrieve and insert operationsProfiles in mongo

type SelfReference Uses

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

SelfReference to hold links and id

type Statement Uses

type Statement struct {
    A   string `bson:"a" json:"a"`
    B   string `bson:"b" json:"b"`
    X   string `bson:"x" json:"x"`

Statement holds an operation statement expressed in the form of A {op} B -> X

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