argo-web-api: Index | Files

package tenants

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 function is used to implement the create tenant request. The request is an http POST request with the tenant description provided as json structure in the request body

func Delete Uses

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

Delete function used to implement remove tenant request

func GetUserByID Uses

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

Delete function used to implement remove tenant request

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 function that implements the http GET request that retrieves all avaiable tenant information

func ListOne Uses

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

ListOne function implement an http GET request that accepts a name parameter urlvar and retrieves information only for the specific tenant

func ListStatus Uses

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

ListStatus show tenant status

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 used to implement update tenant request. This is an http PUT request that gets a specific tenant's name as a urlvar parameter input and a json structure in the request body in order to update the datastore document for the specific tenant

func UpdateStatus Uses

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

type DetailsAMS Uses

type DetailsAMS struct {
    MetricData NodeAMS `bson:"metric_data" json:"metric_data"`
    SyncData   NodeAMS `bson:"sync_data" json:"sync_data"`

type DetailsHDFS Uses

type DetailsHDFS struct {
    MetricData bool                    `bson:"metric_data" json:"metric_data"`
    SyncData   map[string]SyncDataHDFS `bson:"sync_data" json:"sync_data,omitempty"`
type Links struct {
    Self string `json:"self"`

Links struct to hold links

type NodeAMS Uses

type NodeAMS struct {
    Ingestion       bool  `bson:"ingestion" json:"ingestion"`
    Publishing      bool  `bson:"publishing" json:"publishing"`
    StatusStreaming bool  `bson:"status_streaming" json:"status_streaming"`
    MsgArrived      int64 `bson:"messages_arrived" json:"messages_arrived"`

type SelfReference Uses

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

SelfReference to hold links and id

type StatusDetail Uses

type StatusDetail struct {
    TotalStatus  bool        `json:"total_status"`
    AMS          DetailsAMS  `bson:"ams" json:"ams"`
    HDFS         DetailsHDFS `bson:"hdfs" json:"hdfs"`
    EngineConfig bool        `bson:"engine_config" json:"engine_config"`
    LastCheck    string      `bson:"last_check" json:"last_check"`

type SyncDataHDFS Uses

type SyncDataHDFS struct {
    AggregationProf bool `bson:"aggregation_profile" json:"aggregation_profile"`
    Recomp          bool `bson:"blank_recomputation" json:"blank_recomputation"`
    ConfigProf      bool `bson:"configuration_profile" json:"configuration_profile"`
    Donwtimes       bool `bson:"downtimes" json:"downtimes"`
    GroupEndpoints  bool `bson:"group_endpoints" json:"group_endpoints"`
    GroupGroups     bool `bson:"group_groups" json:"group_groups"`
    MetricProf      bool `bson:"metric_profile" json:"metric_profile"`
    OpsProf         bool `bson:"operations_profile" json:"operations_profile"`
    Weight          bool `bson:"weights" json:"weights"`

type Tenant Uses

type Tenant struct {
    ID       string         `bson:"id" json:"id"`
    Info     TenantInfo     `bson:"info" json:"info"`
    DbConf   []TenantDbConf `bson:"db_conf" json:"db_conf,omitempty"`
    Topology TopologyInfo   `bson:"topology" json:"topology"`
    Users    []TenantUser   `bson:"users" json:"users,omitempty"`

Tenant structure holds information about tenant information including db conf and users. Used in

type TenantDbConf Uses

type TenantDbConf struct {
    Store    string `bson:"store" json:"store"`
    Server   string `bson:"server" json:"server"`
    Port     int    `bson:"port" json:"port"`
    Database string `bson:"database" json:"database"`
    Username string `bson:"username" json:"username"`
    Password string `bson:"password" json:"password"`

TenantDbConf structure holds information about tenant's database configuration

type TenantInfo Uses

type TenantInfo struct {
    Name        string `bson:"name" json:"name"`
    Email       string `bson:"email" json:"email"`
    Description string `bson:"description" json:"description"`
    Image       string `bson:"image" json:"image"`
    Website     string `bson:"website" json:"website"`
    Created     string `bson:"created" json:"created"`
    Updated     string `bson:"updated" json:"updated"`

TenantInfo struct holds information about tenant name, contact details

type TenantStatus Uses

type TenantStatus struct {
    ID     string       `bson:"id" json:"id"`
    Info   TenantInfo   `bson:"info" json:"info"`
    Status StatusDetail `bson:"status" json:"status,omitempty"`

type TenantUser Uses

type TenantUser struct {
    ID     string   `bson:"id" json:"id"`
    Name   string   `bson:"name"       json:"name"`
    Email  string   `bson:"email"      json:"email"`
    APIkey string   `bson:"api_key"    json:"api_key"`
    Roles  []string `bson:"roles,omitempty"      json:"roles,omitempty"`

TenantUser structure holds information about tenant's user

type TopologyInfo Uses

type TopologyInfo struct {
    TopoType string `bson:"type" json:"type"`
    Feed     string `bson:"feed" json:"feed"`

TopologyInfo contains topology feed information

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