github.com/niedbalski/juju@v0.0.0-20190215020005-8ff100488e47/core/cache/changes.go (about)

     1  // Copyright 2018 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package cache
     5  
     6  import (
     7  	"github.com/juju/juju/core/constraints"
     8  	"github.com/juju/juju/core/life"
     9  	"github.com/juju/juju/core/status"
    10  )
    11  
    12  // ModelChange represents either a new model, or a change
    13  // to an existing model.
    14  type ModelChange struct {
    15  	ModelUUID string
    16  	Name      string
    17  	Life      life.Value
    18  	Owner     string // tag maybe?
    19  	Config    map[string]interface{}
    20  	Status    status.StatusInfo
    21  }
    22  
    23  // RemoveModel represents the situation when a model is removed
    24  // from the database.
    25  type RemoveModel struct {
    26  	ModelUUID string
    27  }
    28  
    29  // ApplicationChange represents either a new application, or a change
    30  // to an existing application in a model.
    31  type ApplicationChange struct {
    32  	ModelUUID       string
    33  	Name            string
    34  	Exposed         bool
    35  	CharmURL        string
    36  	Life            life.Value
    37  	MinUnits        int
    38  	Constraints     constraints.Value
    39  	Config          map[string]interface{}
    40  	Subordinate     bool
    41  	Status          status.StatusInfo
    42  	WorkloadVersion string
    43  }
    44  
    45  // RemoveApplication represents the situation when an application
    46  // is removed from a model in the database.
    47  type RemoveApplication struct {
    48  	ModelUUID string
    49  	Name      string
    50  }