Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIError ¶
type APIError struct {
Detail string
}
APIError defines the MailChimp API response error structure.
type Ci ¶
type Ci struct { ID string `json:"id"` Type string `json:"type"` Properties map[string]interface{} //Always recieved .. Never sent Token string `json:"$token,omitempty"` CreatedBy string `json:"$createdBy,omitempty"` CreatedAt string `json:"$createdAt,omitempty"` LastModifiedBy string `json:"$lastModifiedBy,omitempty"` LastModifiedAt string `json:"$lastModifiedAt,omitempty"` }
Ci represents a configuration item in xldeploy CreatedBY, CreatedAt, LastModifiedBy, LastModifiedAt are only recieved, never sent
func FlatToCI ¶
FlatToCI transforms a map[string]interface{} object into a proper CI type This is needed to properly display a ci and to communicate a ci back to xldeploy
func NewCIFromMap ¶
NewCIFromMap takes a flat map of properties and turns it into a valic ci type that we can use
type CiExistsAnswer ¶
type CiExistsAnswer struct {
Boolean bool `json:"boolean,omitempty"`
}
CIEXistsAnswer Type to catch the outcome of a ci exists query
type Cis ¶
type Cis []Ci
Cis is a collections of Ci's Properties in xldeploy return JSON are handled as you would normally do .. they are in the json .. flat . As go does not do flat very well when it comes to json UnMarshalling we have to approche this a little different
type Client ¶
type Client struct { // User agent UserAgent string // Client configuration Config *Config // Services Metadata MetadataService Repository RepositoryService // contains filtered or unexported fields }
A Client manages communication with XL-Deploy
func (*Client) NewRequest ¶
NewRequest creates an API request. A relative URL can be provided in urlStr, which will be resolved to the BaseURL of the Client. Relative URLS should always be specified without a preceding slash. If specified, the value pointed to by body is JSON encoded and included in as the request body.
type ClientError ¶
type ClientError struct {
Detail string
}
func (ClientError) Error ¶
func (e ClientError) Error() string
Error method for APIError to satisfy the Error type interface
type Config ¶
type Config struct { User string Password string Host string Port int Context string Scheme string }
Config holds configuration for the client
type MetadataService ¶
type MetadataService struct {
// contains filtered or unexported fields
}
The MetaDataService interface definition
func (MetadataService) GetOrchestrators ¶
func (m MetadataService) GetOrchestrators() (Orchestrators, error)
GetOrchestrators returns the entire list of metadata types in the xldeploy instance
func (MetadataService) GetPermissions ¶
func (m MetadataService) GetPermissions() (Permissions, error)
GetPermissions returns the various that can be set withing xldeploy
func (MetadataService) GetType ¶
func (m MetadataService) GetType(n string) (Type, error)
GetType returns a single metadata type specified by its name
func (MetadataService) GetTypeList ¶
func (m MetadataService) GetTypeList() (TypeList, error)
GetTypeList returns the entire list of metadata types in the xldeploy instance
type Orchestrators ¶
type Orchestrators []string
Orchestrators Struct to hold the list of orchestrators
type Permission ¶
type Permission struct { Level string `json:"level"` PermissionName string `json:"permissionName"` Root string `json:"root,omitempty"` }
Permission holds a single permission
type Property ¶
type Property struct { Name string `json:"name"` Fqn string `json:"fqn"` Label string `json:"label"` Kind string `json:"kind"` Description string `json:"description"` Category string `json:"category"` AsContainment bool `json:"asContainment"` Inspection bool `json:"inspection"` Required bool `json:"required"` RequiredInspection bool `json:"requiredInspection"` Password bool `json:"password"` Transient bool `json:"transient"` Size string `json:"size"` ReferencedType interface{} `json:"referencedType"` Default interface{} `json:"default"` }
Property struct for properties in types
type RepositoryService ¶
type RepositoryService struct {
// contains filtered or unexported fields
}
RepositoryService is the Repository interface definition
func (RepositoryService) CIExists ¶
func (r RepositoryService) CIExists(i string) (bool, error)
CIExists checks if a certain configuration item exists in the xldeploy repository
func (RepositoryService) CreateCI ¶
func (r RepositoryService) CreateCI(c Ci) (Ci, error)
CreateCI creates a new ci in the xldeploy repository
func (RepositoryService) DeleteCI ¶
func (r RepositoryService) DeleteCI(i string) (bool, error)
DeleteCI deletes a CI from xld
type Type ¶
type Type struct { Type string `json:"type"` Virtual bool `json:"virtual"` Icon string `json:"icon"` Description string `json:"description"` Properties []Property `json:"properties"` Interfaces []string `json:"interfaces"` SuperTypes []string `json:"superTypes"` }
Type for types from metadata