Documentation
¶
Index ¶
- func SetAcceptCharges(aws, gcp string) string
- type Accession
- type File
- type Location
- type Param
- type SDL
- func (s *SDL) AddIdent(link string) (string, error)
- func (s *SDL) Retrieve(accession string) (*fuseralib.Accession, error)
- func (s *SDL) RetrieveAll() ([]*fuseralib.Accession, error)
- func (s *SDL) Sign(accession string) (*fuseralib.Accession, error)
- func (s *SDL) SignAll() ([]*fuseralib.Accession, error)
- func (s *SDL) SignAllInBatch(batch int) ([]*fuseralib.Accession, error)
- type VersionWrap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetAcceptCharges ¶
SetAcceptCharges Sets the accept-charges parameter to the proper value according to what cloud profiles were provided.
Types ¶
type Accession ¶
type Accession struct {
ID string `json:"bundle,omitempty"`
Status int `json:"status,omitempty"`
Message string `json:"msg,omitempty"`
Files []*File `json:"files,omitempty"`
}
Accession The JSON object that the SDL API uses to represent an accession.
func (*Accession) Transfigure ¶
Transfigure Changes the SDL representation of an Accession into the Fusera representation.
type File ¶
type File struct {
Name string `json:"name,omitempty"`
Size uint64 `json:"size,omitempty"`
Type string `json:"type,omitempty"`
ModifiedDate time.Time `json:"modificationDate,omitempty"`
Md5Hash string `json:"md5,omitempty"`
Locations []Location `json:"locations,omitempty"`
}
File The JSON object that the SDL API uses to represent a file.
func (*File) Transfigure ¶
Transfigure Changes the SDL representation of a File into the Fusera representation.
type Location ¶
type Location struct {
Link string `json:"link,omitempty"`
Service string `json:"service,omitempty"`
Region string `json:"region,omitempty"`
ExpirationDate time.Time `json:"expirationDate,omitempty"`
CeRequired bool `json:"ceRequired,omitempty"`
PayRequired bool `json:"payRequired,omitempty"`
Bucket string `json:"bucket,omitempty"`
Key string `json:"key,omitempty"`
}
Location The JSON object used by the SDL API to represent the location of a file.
type Param ¶
type Param struct {
Acc []string
Location gps.Locator
Ngc []byte
// Acceptable values are "aws", "gcp", or "aws,gcp"
AcceptCharges string
FileType map[string]bool
}
Param The structure to hold all the various parameters accepted by the SDL API.
func NewParam ¶
func NewParam(acc []string, location gps.Locator, ngc []byte, charges string, types map[string]bool) *Param
NewParam Returns a Param, a convenient structure to hold all the global setting parameters for the SDL API. Most often to be used when creating a new SDL object.
func (*Param) AddGlobals ¶
AddGlobals Adds all global parameters to writer for a request to the SDL API.
type SDL ¶
SDL SDL is the main object to use when wanting to interact with the SDL API.
func (*SDL) AddIdent ¶
AddIdent Adds an ident parameter to a link to fulfill the demand of a Compute Environment Required file link.
func (*SDL) RetrieveAll ¶
RetrieveAll The function to call to get information on all the accessions.
type VersionWrap ¶
type VersionWrap struct {
Version string `json:"version,omitempty"`
Result []*Accession `json:"result,omitempty"`
}
VersionWrap The JSON object that wraps the SDL API's responses.
func (*VersionWrap) Validate ¶
func (v *VersionWrap) Validate() error
Validate VersionWrap 1. Expected Version. 2. Result isn't empty.