# README
go-aspace v0.6.0
a Go library for ArchivesSpace integrations
Use
- Get the go-aspace library: $go get github.com/nyudlts/go-aspace.
- Edit the config file
$GOROOT/github.com/nyudlts/go-aspace/go-aspace.yml_template
, enter your aspace credentials - Import "github.com/nyudlts/go-aspace" into your project
- Create an instance of the aspace client:
package main
import (
"fmt"
"github.com/nyudlts/go-aspace"
)
func main() {
aspaceClient, err := aspace.NewClient(/path/to/go-aspace.yml, "environment to use from config", timeout)
if err != nil {
panic(err)
}
repositories, err := aspaceClient.GetRepositories()
if err != nil {
panic(err)
}
fmt.Println(repositories) //prints the array of Repository IDs from ArchivesSpace.
}
Config Format
A config template can be found in go-aspace.yml_template
dev:
url: https://your-archivesspace-api.url:8089
username: your-username
password: your-password
local:
url: https:/localhost:8089
username: your-username
password: your-password
Example
A simple example application can be found at /example/main.go
go run example/main.go --config /path/to/go-aspace.yml --environment the-environment-to-use
Testing
to run the test suite
go test -v --config /path/to/go-aspace.yml --environment the-environment-to-use
The test suite will select random objects from the specified aspace instance, which may fail serialization to go structs
# Functions
No description provided by the author
NewWorkOrder returns a pointer to a newly constructed WorkOrder.
No description provided by the author
No description provided by the author
No description provided by the author
# Variables
HEADER_ROW is the list of expected work order field names.
No description provided by the author
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
A WorkOrder stores the header and constituent rows for a parsed work order.
A WorkOrderRow holds the values for a single row in the parsed WorkOrder.