Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

type AppContext struct {
         // opaque to the caller
}

// Init app context
func (ac *AppContext) InitAppContext() (interface{}, error)

// Load app context that was previously created
func (ac *AppContext) LoadAppContext(cid interface{}) (interface{}, error)

// Create a new context and returns the handle
func (ac *AppContext) CreateCompositeApp() (interface{}, error)

// Deletes the entire context
func (ac *AppContext) DeleteCompositeApp() (error)

//Returns the handles for a given composite app
func (ac *AppContext) GetCompositeApp() (interface{}, error)

//Add app to the context under composite app
func (ac *AppContext) AddApp(handle interface{}, appname string) (interface{}, error)

//Delete app from the context and everything underneth
func (ac *AppContext) DeleteApp(handle interface{}) (error)

//Returns the hanlde for a given app
func (ac *AppContext) GetAppHandle(appname string) (interface{}, error)

//Add cluster to the context under app
func (ac *AppContext) AddCluster(handle interface{}, clustername string) (interface{}, error)

//Delete cluster from the context and everything underneath
func (ac *AppContext) DeleteCluster(handle interface{}) (error)

//Returns the handle for a given app and cluster
func (ac *AppContext) GetClusterHandle(appname string, clustername string) (interface{}, error)

//Add resource under app and cluster
func (ac *AppContext) AddResource(handle interface{},resname string, value interface{}) (interface{}, error)

//Delete resource given the handle
func (ac *AppContext) DeleteResource(handle interface{}) (error)

//Return the hanlde for given app, cluster and resource name
func (ac *AppContext) GetResourceHandle(appname string, clustername string, resname string) (interface{}, error)

//Update the resource value using the given handle
func (ac *AppContext) UpdateResourceValue(handle interface{}, value interface{}) (error)

//Add instruction under given handle and type
func (ac *AppContext) AddInstruction(handle interface{}, level string, insttype string, value interface{}) (interface{}, error)

//Delete instruction under given handle
func (ac *AppContext) DeleteInstruction(handle interface{}) (error)

//Returns the app instruction for a given instruction type
func (ac *AppContext) GetAppInstruction(insttype string) (interface{}, error)

//Update the instruction using the given handle
func (ac *AppContext) UpdateInstructionValue(handle interface{}, value interface{}) (error)


//Returns the resource instruction for a given instruction type
func (ac *AppContext) GetResourceInstruction(appname string, clustername string, insttype string) (interface{}, error)

//Return all the handles underneath the given handle
func (ac *AppContext) GetAllHandles(handle interface{}) ([]interface{}, error)


//Returns the value for a given handle
func (ac *AppContext) GetValue(handle interface{}) (interface{}, error)