Documentation
¶
Index ¶
- Variables
- func CopyFile(src, dst string) (int64, error)
- func FetchFile(filename string, url string, token string, uncompress string, computeMD5 bool) (size int64, md5sum string, err error)
- func FetchShockStream(url string, token string) (r io.ReadCloser, err error)
- func ShockDelete(host string, nodeid string, token string) (err error)
- type IdxInfo
- type ShockClient
- func (sc *ShockClient) Do_request(method string, resource string, query url.Values, response interface{}) (err error)
- func (sc *ShockClient) Do_request_DEPRECATED(method string, resource string, query url.Values, response interface{}) (err error)
- func (sc *ShockClient) Get_node(node_id string) (sqr_p *ShockResponse, err error)
- func (sc *ShockClient) Get_node_download_url(node ShockNode) (download_url string, err error)
- func (sc *ShockClient) Get_request(resource string, query url.Values, response interface{}) (err error)
- func (sc *ShockClient) Make_public(node_id string) (sqr_p *ShockResponseGeneric, err error)
- func (sc *ShockClient) Put_request(resource string, query url.Values, response interface{}) (err error)
- func (sc *ShockClient) Query(query url.Values) (sqr_p *ShockQueryResponse, err error)
- type ShockNode
- type ShockQueryResponse
- type ShockResponse
- type ShockResponseGeneric
Constants ¶
This section is empty.
Variables ¶
View Source
var SHOCK_TIMEOUT = 60 * time.Second
Functions ¶
func CopyFile ¶
source: http://stackoverflow.com/a/22259280 TODO this is not shock related, need another package
func FetchFile ¶
func FetchFile(filename string, url string, token string, uncompress string, computeMD5 bool) (size int64, md5sum string, err error)
fetch file by shock url
func FetchShockStream ¶
func FetchShockStream(url string, token string) (r io.ReadCloser, err error)
Types ¶
type ShockClient ¶
func (*ShockClient) Do_request ¶ added in v0.9.13
func (*ShockClient) Do_request_DEPRECATED ¶ added in v0.9.13
func (sc *ShockClient) Do_request_DEPRECATED(method string, resource string, query url.Values, response interface{}) (err error)
deprecated, this is with explicit timeout
func (*ShockClient) Get_node ¶ added in v0.9.13
func (sc *ShockClient) Get_node(node_id string) (sqr_p *ShockResponse, err error)
func (*ShockClient) Get_node_download_url ¶
func (sc *ShockClient) Get_node_download_url(node ShockNode) (download_url string, err error)
func (*ShockClient) Get_request ¶
func (sc *ShockClient) Get_request(resource string, query url.Values, response interface{}) (err error)
func (*ShockClient) Make_public ¶ added in v0.9.13
func (sc *ShockClient) Make_public(node_id string) (sqr_p *ShockResponseGeneric, err error)
func (*ShockClient) Put_request ¶ added in v0.9.13
func (sc *ShockClient) Put_request(resource string, query url.Values, response interface{}) (err error)
func (*ShockClient) Query ¶
func (sc *ShockClient) Query(query url.Values) (sqr_p *ShockQueryResponse, err error)
example: query_response_p, err := sc.Shock_query(host, url.Values{"docker": {"1"}, "docker_image_name" : {"wgerlach/bowtie2:2.2.0"}});
type ShockNode ¶
type ShockNode struct { Id string `bson:"id" json:"id"` Version string `bson:"version" json:"version"` File shockfile `bson:"file" json:"file"` Attributes interface{} `bson:"attributes" json:"attributes"` Public bool `bson:"public" json:"public"` Indexes map[string]IdxInfo `bson:"indexes" json:"indexes"` //Acl Acl `bson:"acl" json:"-"` //VersionParts map[string]string `bson:"version_parts" json:"-"` Tags []string `bson:"tags" json:"tags"` //Revisions []ShockNode `bson:"revisions" json:"-"` Linkages []linkage `bson:"linkage" json:"linkages"` //CreatedOn time.Time `bson:"created_on" json:"created_on"` //LastModified time.Time `bson:"last_modified" json:"last_modified"` Type string `bson:"type" json:"type"` }
type ShockQueryResponse ¶
type ShockResponse ¶
type ShockResponseGeneric ¶ added in v0.9.13
Click to show internal directories.
Click to hide internal directories.