Documentation
¶
Index ¶
- func CodecWithCors(corsDomains []string, baseCodec rpc.Codec) rpc.Codec
- func JSONExist(filename string, ifNewerThan time.Duration) bool
- func JSONLoad(filename string, data interface{}) error
- func JSONStore(filename string, data interface{}) error
- func MSystem(c config.Config) string
- type MetadataGetParams
- type MetadataRequestType
- type MetadataResponse
- type MetadataService
- type Object
- type ObjectParams
- type ObjectService
- type Objects
- type SearchArgs
- type SearchPage
- type SearchService
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CodecWithCors ¶
CodecWithCors creates a custom Codec that adds headers to the WriteResponse
Types ¶
type MetadataGetParams ¶
type MetadataGetParams struct {
Connection config.Config `json:"connection"`
Oldest time.Duration `json:"oldest"` // the oldst metadata we're willing to accept (minutes)
Extraction string // (|STANDARD-XML|COMPACT|COMPACT-INCREMENTAL) the format to pull from the server
}
MetadataGetParams ...
type MetadataRequestType ¶
type MetadataRequestType func(ctx context.Context, requester rets.Requester, url string) (*metadata.MSystem, error)
MetadataRequestType is a typedef metadata extraction options
type MetadataResponse ¶
type MetadataResponse struct {
Metadata metadata.MSystem `json:"Metadata"`
Wirelog []byte `json:"wirelog,omitempty"`
}
MetadataResponse ...
type MetadataService ¶
type MetadataService struct{}
MetadataService ...
func (MetadataService) Get ¶
func (ms MetadataService) Get(r *http.Request, args *MetadataGetParams, reply *MetadataResponse) error
Get ....
type Object ¶
type Object struct {
ContentID string `json:",omitempty"`
ContentType string `json:",omitempty"`
ObjectID int `json:",omitempty"`
UID string `json:",omitempty"`
Description string `json:",omitempty"`
SubDescription string `json:",omitempty"`
Location string `json:",omitempty"`
RetsError bool `json:",omitempty"`
// RetsMessage *rets.Response
Preferred bool `json:",omitempty"`
ObjectData map[string]string `json:",omitempty"`
Blob []byte `json:",omitempty"`
}
Object ...
type ObjectParams ¶
type ObjectParams struct {
Connection config.Config `json:"connection"`
Resource string `json:"resource"`
Type string `json:"type"`
ID string `json:"ids"`
Location int `json:"location"` // setting to 1 requests the URL to the photo
}
ObjectParams ...
type ObjectService ¶
type ObjectService struct{}
ObjectService ...
func (ObjectService) Get ¶
func (os ObjectService) Get(r *http.Request, args *ObjectParams, reply *Objects) error
Get ....
type SearchArgs ¶
type SearchArgs struct {
Connection config.Config `json:"connection"`
Resource string `json:"resource"`
Class string `json:"class"`
Format string `json:"format"`
Select string `json:"select"`
CountType int `json:"counttype"`
Offset int `json:"offset"`
Limit int `json:"limit"`
Query string `json:"query"`
QueryType string `json:"querytype"`
}
SearchArgs ...
type SearchPage ¶
type SearchPage struct {
Columns rets.Row `json:"columns"`
Rows []rets.Row `json:"rows"`
MaxRows bool `json:"maxrows"`
Count int `json:"count"`
Wirelog []byte `json:"wirelog,omitempty"`
}
SearchPage ...
type SearchService ¶
type SearchService struct{}
SearchService ...
func (SearchService) Run ¶
func (ms SearchService) Run(r *http.Request, args *SearchArgs, reply *SearchPage) error
Run ....
Click to show internal directories.
Click to hide internal directories.