github.com/altoros/juju-vmware@v0.0.0-20150312064031-f19ae857ccca/apiserver/params/backups.go (about)

     1  // Copyright 2014 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/names"
    10  
    11  	"github.com/juju/juju/instance"
    12  	"github.com/juju/juju/version"
    13  )
    14  
    15  // BackupsCreateArgs holds the args for the API Create method.
    16  type BackupsCreateArgs struct {
    17  	Notes string
    18  }
    19  
    20  // BackupsInfoArgs holds the args for the API Info method.
    21  type BackupsInfoArgs struct {
    22  	ID string
    23  }
    24  
    25  // BackupsListArgs holds the args for the API List method.
    26  type BackupsListArgs struct {
    27  }
    28  
    29  // BackupsDownloadArgs holds the args for the API Download method.
    30  type BackupsDownloadArgs struct {
    31  	ID string
    32  }
    33  
    34  // BackupsUploadArgs holds the args for the API Upload method.
    35  type BackupsUploadArgs struct {
    36  	Data     []byte
    37  	Metadata BackupsMetadataResult
    38  }
    39  
    40  // BackupsRemoveArgs holds the args for the API Remove method.
    41  type BackupsRemoveArgs struct {
    42  	ID string
    43  }
    44  
    45  // BackupsListResult holds the list of all stored backups.
    46  type BackupsListResult struct {
    47  	List []BackupsMetadataResult
    48  }
    49  
    50  // BackupsListResult holds the list of all stored backups.
    51  type BackupsUploadResult struct {
    52  	ID string
    53  }
    54  
    55  // BackupsMetadataResult holds the metadata for a backup as returned by
    56  // an API backups method (such as Create).
    57  type BackupsMetadataResult struct {
    58  	ID string
    59  
    60  	Checksum       string
    61  	ChecksumFormat string
    62  	Size           int64
    63  	Stored         time.Time // May be zero...
    64  
    65  	Started     time.Time
    66  	Finished    time.Time // May be zero...
    67  	Notes       string
    68  	Environment string
    69  	Machine     string
    70  	Hostname    string
    71  	Version     version.Number
    72  }
    73  
    74  // RestoreArgs holds the args to be used to call state/backups.Restore
    75  type RestoreArgs struct {
    76  	PrivateAddress string
    77  	NewInstId      instance.Id
    78  	NewInstTag     names.Tag
    79  	NewInstSeries  string
    80  }