github.com/makyo/juju@v0.0.0-20160425123129-2608902037e9/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/version"
    10  )
    11  
    12  // BackupsCreateArgs holds the args for the API Create method.
    13  type BackupsCreateArgs struct {
    14  	Notes string
    15  }
    16  
    17  // BackupsInfoArgs holds the args for the API Info method.
    18  type BackupsInfoArgs struct {
    19  	ID string
    20  }
    21  
    22  // BackupsListArgs holds the args for the API List method.
    23  type BackupsListArgs struct {
    24  }
    25  
    26  // BackupsDownloadArgs holds the args for the API Download method.
    27  type BackupsDownloadArgs struct {
    28  	ID string
    29  }
    30  
    31  // BackupsUploadArgs holds the args for the API Upload method.
    32  type BackupsUploadArgs struct {
    33  	Data     []byte
    34  	Metadata BackupsMetadataResult
    35  }
    36  
    37  // BackupsRemoveArgs holds the args for the API Remove method.
    38  type BackupsRemoveArgs struct {
    39  	ID string
    40  }
    41  
    42  // BackupsListResult holds the list of all stored backups.
    43  type BackupsListResult struct {
    44  	List []BackupsMetadataResult
    45  }
    46  
    47  // BackupsListResult holds the list of all stored backups.
    48  type BackupsUploadResult struct {
    49  	ID string
    50  }
    51  
    52  // BackupsMetadataResult holds the metadata for a backup as returned by
    53  // an API backups method (such as Create).
    54  type BackupsMetadataResult struct {
    55  	ID string
    56  
    57  	Checksum       string
    58  	ChecksumFormat string
    59  	Size           int64
    60  	Stored         time.Time // May be zero...
    61  
    62  	Started  time.Time
    63  	Finished time.Time // May be zero...
    64  	Notes    string
    65  	Model    string
    66  	Machine  string
    67  	Hostname string
    68  	Version  version.Number
    69  
    70  	CACert       string
    71  	CAPrivateKey string
    72  }
    73  
    74  // RestoreArgs Holds the backup file or id
    75  type RestoreArgs struct {
    76  	// BackupId holds the id of the backup in server if any
    77  	BackupId string
    78  }