github.com/mhilton/juju-juju@v0.0.0-20150901100907-a94dd2c73455/apiserver/params/environment.go (about)

     1  // Copyright 2015 Canonical Ltd.
     2  // Licensed under the AGPLv3, see LICENCE file for details.
     3  
     4  package params
     5  
     6  import (
     7  	"time"
     8  
     9  	"github.com/juju/juju/version"
    10  )
    11  
    12  // EnvironmentConfigResults contains the result of client API calls
    13  // to get environment config values.
    14  type EnvironmentConfigResults struct {
    15  	Config map[string]interface{}
    16  }
    17  
    18  // EnvironmentSet contains the arguments for EnvironmentSet client API
    19  // call.
    20  type EnvironmentSet struct {
    21  	Config map[string]interface{}
    22  }
    23  
    24  // EnvironmentUnset contains the arguments for EnvironmentUnset client API
    25  // call.
    26  type EnvironmentUnset struct {
    27  	Keys []string
    28  }
    29  
    30  // ModifyEnvironUsers holds the parameters for making Client ShareEnvironment calls.
    31  type ModifyEnvironUsers struct {
    32  	Changes []ModifyEnvironUser
    33  }
    34  
    35  // EnvironAction is an action that can be preformed on an environment.
    36  type EnvironAction string
    37  
    38  // Actions that can be preformed on an environment.
    39  const (
    40  	AddEnvUser    EnvironAction = "add"
    41  	RemoveEnvUser EnvironAction = "remove"
    42  )
    43  
    44  // ModifyEnvironUser stores the parameters used for a Client.ShareEnvironment call.
    45  type ModifyEnvironUser struct {
    46  	UserTag string        `json:"user-tag"`
    47  	Action  EnvironAction `json:"action"`
    48  }
    49  
    50  // SetEnvironAgentVersion contains the arguments for
    51  // SetEnvironAgentVersion client API call.
    52  type SetEnvironAgentVersion struct {
    53  	Version version.Number
    54  }
    55  
    56  // EnvUserInfo holds information on a user.
    57  type EnvUserInfo struct {
    58  	UserName       string     `json:"user"`
    59  	DisplayName    string     `json:"displayname"`
    60  	CreatedBy      string     `json:"createdby"`
    61  	DateCreated    time.Time  `json:"datecreated"`
    62  	LastConnection *time.Time `json:"lastconnection"`
    63  }
    64  
    65  // EnvUserInfoResult holds the result of an EnvUserInfo call.
    66  type EnvUserInfoResult struct {
    67  	Result *EnvUserInfo `json:"result,omitempty"`
    68  	Error  *Error       `json:"error,omitempty"`
    69  }
    70  
    71  // EnvUserInfoResults holds the result of a bulk EnvUserInfo API call.
    72  type EnvUserInfoResults struct {
    73  	Results []EnvUserInfoResult `json:"results"`
    74  }