v4

package
v0.0.0-...-02cbf39 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2015 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HEADER_ODataVersion    = "OData-Version"
	HEADER_ODataMaxVersion = "OData-MaxVersion"
)
View Source
const (
	ODataVersion = "4.0"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type EntryAnnotation

type EntryAnnotation struct {
	ODataContext  string `json:"@odata.context,omitempty"`  // example = "http://services.odata.org/V4/TripPinService/$metadata#People/$entity"
	ODataId       string `json:"@odata.id,omitempty"`       // example = "http://services.odata.org/V4/TripPinService/People('russellwhyte')"
	ODataETag     string `json:"@odata.etag,omitempty"`     // example = "W/\"08D256BD91FA2AEF\""
	ODataEditLink string `json:"@odata.editLink,omitempty"` // example = "http://services.odata.org/V4/TripPinService/People('russellwhyte')"
}
func (e *EntryAnnotation) SetEditLink(resourceUrl string, id string)

func (*EntryAnnotation) SetId

func (e *EntryAnnotation) SetId(resourceUrl string, id string)

type Error

type Error struct {
	Code       string      `json:"code"`
	Message    string      `json:"message"`
	InnerError *InnerError `json:"innererror,omitempty"`
}

type InnerError

type InnerError struct {
	Message    string `json:"message"`
	Type       string `json:"type"`
	StackTrace string `json:"stacktrace"`
}

type Resource

type Resource struct {
	Name string       `json:"name"`
	Kind ResourceKind `json:"kind"`
	Url  string       `json:"url"`
}

type ResourceKind

type ResourceKind string
const (
	// Read the service root
	KindEntitySet      ResourceKind = "EntitySet"
	KindSingleton      ResourceKind = "Singleton"
	KindFunctionImport ResourceKind = "FunctionImport"
)

type ResponseEntrySet

type ResponseEntrySet struct {
	ResponseHeader

	ODataNextLink string `json:"@odata.nextLink,omitempty"` // example = "http://services.odata.org/V4/TripPinService/People?%24skiptoken=8"

	Entries interface{} `json:"value"`
}

type ResponseError

type ResponseError struct {
	Error Error `json:"error"`
}

func (*ResponseError) String

func (e *ResponseError) String() string

type ResponseHeader

type ResponseHeader struct {
	ODataContext string `json:"@odata.context,omitempty"` // example = "http://services.odata.org/V4/TripPinService/$metadata"
}

type ResponseResourceList

type ResponseResourceList struct {
	ResponseHeader

	Resources []Resource `json:"value"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL