Documentation
¶
Overview ¶
blend4go Galaxy API client library for Golang
For most use cases, NewGalaxyInstance and GetAPIKey are the only functions in the root package that should be used. Subpackages provide their own implementations of the remaining functions and those should be preferred. Subpackages are organised by subject. See workflows, users, tools, roles, repositories, libraries, jobs, histories, groups, or datatypes subpackages for more information.
A number of subpackages are currently unimplemented, they will be implemented with interest in this project or as needed
Index ¶
- func GetAPIKey(ctx context.Context, host, username, password string) (string, error)
- func HandleResponse(response *resty.Response) (interface{}, error)
- type ErrorResponse
- type GalaxyID
- type GalaxyInstance
- func (g *GalaxyInstance) Debug(v ...interface{})
- func (g *GalaxyInstance) Debugf(format string, v ...interface{})
- func (g *GalaxyInstance) Delete(ctx context.Context, model GalaxyModel, params *map[string]string) error
- func (g *GalaxyInstance) Error(v ...interface{})
- func (g *GalaxyInstance) Errorf(format string, v ...interface{})
- func (g *GalaxyInstance) Get(ctx context.Context, id GalaxyID, model GalaxyModel, params *map[string]string) (GalaxyModel, error)
- func (g *GalaxyInstance) HandleResponse(response *resty.Response) (interface{}, error)
- func (g *GalaxyInstance) Info(v ...interface{})
- func (g *GalaxyInstance) Infof(format string, v ...interface{})
- func (g *GalaxyInstance) List(ctx context.Context, path string, models interface{}, ...) (interface{}, error)
- func (g *GalaxyInstance) Patch(ctx context.Context, model GalaxyModel, params *map[string]string) (GalaxyModel, error)
- func (g *GalaxyInstance) Put(ctx context.Context, model GalaxyModel, params *map[string]string) (GalaxyModel, error)
- func (g *GalaxyInstance) R(ctx context.Context) GalaxyRequest
- func (g *GalaxyInstance) ToolSheds(ctx context.Context) ([]*ToolShed, error)
- func (g *GalaxyInstance) Version(ctx context.Context) (string, error)
- type GalaxyModel
- type GalaxyRequest
- type LogLevel
- type StatusResponse
- type ToolShed
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAPIKey ¶ added in v0.1.3
returns an API key for authenticated user based on BaseAuth headers Username is the users email address until https://github.com/galaxyproject/galaxy/pull/10521
func HandleResponse ¶ added in v0.1.12
func HandleResponse(response *resty.Response) (interface{}, error)
Handle responses from Galaxy API, checking for errors
Types ¶
type ErrorResponse ¶ added in v0.1.12
type ErrorResponse struct { URL string Method string Message1 string `json:"message"` Code1 string `json:"code"` Message string `json:"err_msg"` Code int `json:"err_code"` }
func (*ErrorResponse) Error ¶ added in v0.2.1
func (e *ErrorResponse) Error() string
func (*ErrorResponse) String ¶ added in v0.1.12
func (e *ErrorResponse) String() string
type GalaxyID ¶
type GalaxyID = string
https://blog.golang.org/publishing-go-modules https://github.com/go-resty/resty https://pkg.go.dev/github.com/go-resty/resty
type GalaxyInstance ¶
type GalaxyInstance struct { Client *resty.Client // contains filtered or unexported fields }
func NewGalaxyInstance ¶
func NewGalaxyInstance(host, apiKey string) (g *GalaxyInstance)
func NewGalaxyInstanceLogger ¶ added in v0.2.2
func NewGalaxyInstanceLogger(host, apiKey string, logWriter io.Writer, logLevel LogLevel) (g *GalaxyInstance)
Create a new connection handle to an instance of Galaxy
func (*GalaxyInstance) Debug ¶ added in v0.2.2
func (g *GalaxyInstance) Debug(v ...interface{})
func (*GalaxyInstance) Debugf ¶ added in v0.2.2
func (g *GalaxyInstance) Debugf(format string, v ...interface{})
func (*GalaxyInstance) Delete ¶
func (g *GalaxyInstance) Delete(ctx context.Context, model GalaxyModel, params *map[string]string) error
Helper to make generic DELETE requests to delete single objects params is a map of query parameters to add to the request
func (*GalaxyInstance) Error ¶ added in v0.2.2
func (g *GalaxyInstance) Error(v ...interface{})
func (*GalaxyInstance) Errorf ¶ added in v0.2.2
func (g *GalaxyInstance) Errorf(format string, v ...interface{})
func (*GalaxyInstance) Get ¶
func (g *GalaxyInstance) Get(ctx context.Context, id GalaxyID, model GalaxyModel, params *map[string]string) (GalaxyModel, error)
Helper to make generic requests against Galaxy API that returns single object params is a map of query parameters to add to the request
func (*GalaxyInstance) HandleResponse ¶ added in v0.2.2
func (g *GalaxyInstance) HandleResponse(response *resty.Response) (interface{}, error)
func (*GalaxyInstance) Info ¶ added in v0.2.2
func (g *GalaxyInstance) Info(v ...interface{})
func (*GalaxyInstance) Infof ¶ added in v0.2.2
func (g *GalaxyInstance) Infof(format string, v ...interface{})
func (*GalaxyInstance) List ¶
func (g *GalaxyInstance) List(ctx context.Context, path string, models interface{}, params *map[string]string) (interface{}, error)
Helper to make generic requests against Galaxy API that return lists of objects params is a map of query parameters to add to the request
func (*GalaxyInstance) Patch ¶ added in v0.2.2
func (g *GalaxyInstance) Patch(ctx context.Context, model GalaxyModel, params *map[string]string) (GalaxyModel, error)
Helper to make generic PATCH requests to Galaxy API to update objects params is a map of query parameters to add to the request
func (*GalaxyInstance) Put ¶
func (g *GalaxyInstance) Put(ctx context.Context, model GalaxyModel, params *map[string]string) (GalaxyModel, error)
Helper to make generic PUT requests to Galaxy API to update objects params is a map of query parameters to add to the request
func (*GalaxyInstance) R ¶
func (g *GalaxyInstance) R(ctx context.Context) GalaxyRequest
Helper to create a new request to the Galaxy API Use this if one of the other functions in this package are not appropriate for the request
type GalaxyModel ¶
type GalaxyModel interface { GetBasePath() string SetGalaxyInstance(*GalaxyInstance) GetID() GalaxyID SetID(GalaxyID) }
type GalaxyRequest ¶
type GalaxyRequest = *resty.Request
type StatusResponse ¶
Directories
¶
Path | Synopsis |
---|---|
datatypes models represent and manipulate datatypes within a Galaxy instance Relevant api endpoints are: `/api/datatypes`
|
datatypes models represent and manipulate datatypes within a Galaxy instance Relevant api endpoints are: `/api/datatypes` |
groups models represent and manipulate groups within a Galaxy instance Relevant api endpoints are: `/api/groups`
|
groups models represent and manipulate groups within a Galaxy instance Relevant api endpoints are: `/api/groups` |
histories models represent and manipulate histories and their contents within a Galaxy instance Relevant api endpoints are: `/api/histories`, `/api/histories/{id}/contents/`
|
histories models represent and manipulate histories and their contents within a Galaxy instance Relevant api endpoints are: `/api/histories`, `/api/histories/{id}/contents/` |
jobs models represent and manipulate jobs within a Galaxy instance Relevant api endpoints are: `/api/jobs`, `/api/job_lock`
|
jobs models represent and manipulate jobs within a Galaxy instance Relevant api endpoints are: `/api/jobs`, `/api/job_lock` |
libraries models represent and manipulate libraries within a Galaxy instance Relevant api endpoints are: `/api/libraries`
|
libraries models represent and manipulate libraries within a Galaxy instance Relevant api endpoints are: `/api/libraries` |
quotas models represent and manipulate quotas within a Galaxy instance Relevant api endpoints are: `/api/quotas`
|
quotas models represent and manipulate quotas within a Galaxy instance Relevant api endpoints are: `/api/quotas` |
repositories models represent and manipulate repositories within a Galaxy instance Relevant api endpoints are: `/api/tool_shed_repositories`
|
repositories models represent and manipulate repositories within a Galaxy instance Relevant api endpoints are: `/api/tool_shed_repositories` |
roles models represent and manipulate roles within a Galaxy instance Relevant api endpoints are: `/api/roles`
|
roles models represent and manipulate roles within a Galaxy instance Relevant api endpoints are: `/api/roles` |
tools models represent and manipulate tools within a Galaxy instance Relevant api endpoints are: `/api/tools`
|
tools models represent and manipulate tools within a Galaxy instance Relevant api endpoints are: `/api/tools` |
users models represent and manipulate users within a Galaxy instance Relevant api endpoints are: `/api/users`
|
users models represent and manipulate users within a Galaxy instance Relevant api endpoints are: `/api/users` |
workflows models represent and manipulate workflows within a Galaxy instance Relevant api endpoints are: `/api/workflows`, `/api/invocations`
|
workflows models represent and manipulate workflows within a Galaxy instance Relevant api endpoints are: `/api/workflows`, `/api/invocations` |