Versions in this module Expand all Collapse all v0 v0.4.0 Apr 29, 2019 Changes in this version + const FieldTypeArray + const FieldTypeBoolean + const FieldTypeDate + const FieldTypeInteger + const FieldTypeLink + const FieldTypeLocation + const FieldTypeObject + const FieldTypeSymbol + const FieldTypeText + const FieldValidationRegexPattern12HourTime + const FieldValidationRegexPattern24HourTime + const FieldValidationRegexPatternEmail + const FieldValidationRegexPatternEuorpeanDate + const FieldValidationRegexPatternURL + const FieldValidationRegexPatternUSDate + const FieldValidationRegexPatternUSPhoneNumber + const FieldValidationRegexPatternUSZipCode + const MimeTypeArchive + const MimeTypeAttachment + const MimeTypeAudio + const MimeTypeCode + const MimeTypeImage + const MimeTypeMarkup + const MimeTypePDF + const MimeTypePlainText + const MimeTypePresentation + const MimeTypeRichText + const MimeTypeSpreadSheet + const MimeTypeVideo + var Version = "0.3.1" + type APIError struct + type APIKey struct + AccessToken string + Description string + Name string + Policies []*APIKeyPolicy + PreviewAPIKey *PreviewAPIKey + Sys *Sys + func (apiKey *APIKey) GetVersion() int + func (apiKey *APIKey) MarshalJSON() ([]byte, error) + type APIKeyPolicy struct + Actions string + Effect string + type APIKeyService service + func (service *APIKeyService) Delete(spaceID string, apiKey *APIKey) error + func (service *APIKeyService) Get(spaceID, apiKeyID string) (*APIKey, error) + func (service *APIKeyService) List(spaceID string) *Collection + func (service *APIKeyService) Upsert(spaceID string, apiKey *APIKey) error + type AccessDeniedError struct + type AccessTokenInvalidError struct + func (e AccessTokenInvalidError) Error() string + type Asset struct + Fields *FileFields + Sys *Sys + func (asset *Asset) GetVersion() int + func (asset *Asset) MarshalJSON() ([]byte, error) + func (asset *Asset) UnmarshalJSON(data []byte) error + type AssetsService service + func (service *AssetsService) Delete(spaceID string, asset *Asset) error + func (service *AssetsService) Get(spaceID, assetID string) (*Asset, error) + func (service *AssetsService) List(spaceID string) *Collection + func (service *AssetsService) Process(spaceID string, asset *Asset) error + func (service *AssetsService) Publish(spaceID string, asset *Asset) error + func (service *AssetsService) Upsert(spaceID string, asset *Asset) error + type BadRequestError struct + type Collection struct + Includes interface{} + Items []interface{} + Limit int + Skip int + Sys *Sys + Total int + func NewCollection(options *CollectionOptions) *Collection + func (col *Collection) Next() (*Collection, error) + func (col *Collection) ToAPIKey() []*APIKey + func (col *Collection) ToAsset() []*Asset + func (col *Collection) ToContentType() []*ContentType + func (col *Collection) ToEntry() []*Entry + func (col *Collection) ToLocale() []*Locale + func (col *Collection) ToSpace() []*Space + func (col *Collection) ToWebhook() []*Webhook + type CollectionOptions struct + Limit uint16 + type ContentType struct + Description string + DisplayField string + Fields []*Field + Name string + Sys *Sys + func (ct *ContentType) GetVersion() int + type ContentTypesService service + func (service *ContentTypesService) Activate(spaceID string, ct *ContentType) error + func (service *ContentTypesService) Deactivate(spaceID string, ct *ContentType) error + func (service *ContentTypesService) Delete(spaceID string, ct *ContentType) error + func (service *ContentTypesService) Get(spaceID, contentTypeID string) (*ContentType, error) + func (service *ContentTypesService) List(spaceID string) *Collection + func (service *ContentTypesService) Upsert(spaceID string, ct *ContentType) error + type Contentful struct + APIKeys *APIKeyService + Assets *AssetsService + BaseURL string + ContentTypes *ContentTypesService + Debug bool + Entries *EntriesService + Headers map[string]string + Locales *LocalesService + QueryParams map[string]string + Spaces *SpacesService + Webhooks *WebhooksService + func NewCDA(token string) *Contentful + func NewCMA(token string) *Contentful + func NewCPA(token string) *Contentful + func (c *Contentful) SetHTTPClient(client *http.Client) + func (c *Contentful) SetOrganization(organizationID string) *Contentful + type DateMinMax struct + Max time.Time + Min time.Time + type EntriesService service + func (service *EntriesService) Delete(spaceID string, entryID string) error + func (service *EntriesService) Get(spaceID, entryID string) (*Entry, error) + func (service *EntriesService) GetEntryKey(entry *Entry, key string) (*EntryField, error) + func (service *EntriesService) List(spaceID string) *Collection + func (service *EntriesService) Publish(spaceID string, entry *Entry) error + func (service *EntriesService) Unpublish(spaceID string, entry *Entry) error + type Entry struct + Fields map[string]interface{} + Sys *Sys + func (entry *Entry) GetVersion() int + type EntryField struct + func (ef *EntryField) Array() []string + func (ef *EntryField) Asset() *Asset + func (ef *EntryField) Entry() *Entry + func (ef *EntryField) Integer() int + func (ef *EntryField) LArray(locale string) []string + func (ef *EntryField) LAsset(locale string) *Asset + func (ef *EntryField) LEntry(locale string) *Entry + func (ef *EntryField) LInteger(locale string) int + func (ef *EntryField) LLinkID(locale string) string + func (ef *EntryField) LLinkType(locale string) string + func (ef *EntryField) LString(locale string) string + func (ef *EntryField) LinkID() string + func (ef *EntryField) LinkType() string + func (ef *EntryField) String() string + type ErrorDetail struct + Details string + ID string + Name string + Path interface{} + Value interface{} + type ErrorDetails struct + Errors []*ErrorDetail + type ErrorResponse struct + Details *ErrorDetails + Message string + RequestID string + Sys *Sys + func (e ErrorResponse) Error() string + type Field struct + Disabled bool + ID string + Items *FieldTypeArrayItem + LinkType string + Localized bool + Name string + Omitted bool + Required bool + Type string + Validations []FieldValidation + func (field *Field) UnmarshalJSON(data []byte) error + type FieldTypeArrayItem struct + LinkType string + Type string + Validations []FieldValidation + func (item *FieldTypeArrayItem) UnmarshalJSON(data []byte) error + type FieldValidation interface + func ParseValidations(data []interface{}) (validations []FieldValidation, err error) + type FieldValidationDate struct + ErrorMessage string + Range *DateMinMax + func (v *FieldValidationDate) MarshalJSON() ([]byte, error) + func (v *FieldValidationDate) UnmarshalJSON(data []byte) error + type FieldValidationDimension struct + ErrorMessage string + Height *MinMax + Width *MinMax + func (v *FieldValidationDimension) MarshalJSON() ([]byte, error) + func (v *FieldValidationDimension) UnmarshalJSON(data []byte) error + type FieldValidationFileSize struct + ErrorMessage string + Size *MinMax + type FieldValidationLink struct + LinkContentType []string + type FieldValidationMimeType struct + MimeTypes []string + type FieldValidationPredefinedValues struct + ErrorMessage string + In []interface{} + type FieldValidationRange struct + ErrorMessage string + Range *MinMax + type FieldValidationRegex struct + ErrorMessage string + Regex *Regex + type FieldValidationSize struct + ErrorMessage string + Size *MinMax + type FieldValidationUnique struct + Unique bool + type File struct + ContentType string + Detail *FileDetail + Name string + URL string + UploadURL string + type FileDetail struct + Image *FileImage + Size int + type FileFields struct + Description string + File *File + Title string + type FileImage struct + Height int + Width int + type InvalidQueryError struct + type Locale struct + CDA bool + CMA bool + Code string + Default bool + FallbackCode string + Name string + Optional bool + Sys *Sys + func (locale *Locale) GetVersion() int + type LocalesService service + func (service *LocalesService) Delete(spaceID string, locale *Locale) error + func (service *LocalesService) Get(spaceID, localeID string) (*Locale, error) + func (service *LocalesService) List(spaceID string) *Collection + func (service *LocalesService) Upsert(spaceID string, locale *Locale) error + type MinMax struct + Max float64 + Min float64 + type NotFoundError struct + func (e NotFoundError) Error() string + type PreviewAPIKey struct + Sys *Sys + type Query struct + func NewQuery() *Query + func (q *Query) All(field string, value []string) *Query + func (q *Query) ContentType(ct string) *Query + func (q *Query) Equal(field string, value interface{}) *Query + func (q *Query) Exists(field string) *Query + func (q *Query) GreaterThan(field string, value interface{}) *Query + func (q *Query) GreaterThanOrEqual(field string, value interface{}) *Query + func (q *Query) In(field string, value []string) *Query + func (q *Query) Include(include uint16) *Query + func (q *Query) LessThan(field string, value interface{}) *Query + func (q *Query) LessThanOrEqual(field string, value interface{}) *Query + func (q *Query) Limit(limit uint16) *Query + func (q *Query) Locale(locale string) *Query + func (q *Query) Match(field, match string) *Query + func (q *Query) MimeType(mime string) *Query + func (q *Query) Near(field string, lat, lon int16) *Query + func (q *Query) NotEqual(field string, value interface{}) *Query + func (q *Query) NotExists(field string) *Query + func (q *Query) NotIn(field string, value []string) *Query + func (q *Query) Order(field string, reverse bool) *Query + func (q *Query) Query(qStr string) *Query + func (q *Query) Select(fields []string) *Query + func (q *Query) Skip(skip uint16) *Query + func (q *Query) String() string + func (q *Query) Values() url.Values + func (q *Query) Within(field string, lat1, lon1, lat2, lon2 int16) *Query + func (q *Query) WithinRadius(field string, lat1, lon1, radius int16) *Query + type RateLimitExceededError struct + func (e RateLimitExceededError) Error() string + type Regex struct + Flags string + Pattern string + type ServerError struct + type Space struct + DefaultLocale string + Name string + Sys *Sys + func (space *Space) GetVersion() int + func (space *Space) MarshalJSON() ([]byte, error) + type SpacesService service + func (service *SpacesService) Delete(space *Space) error + func (service *SpacesService) Get(spaceID string) (*Space, error) + func (service *SpacesService) List() *Collection + func (service *SpacesService) Upsert(space *Space) error + type Sys struct + ContentType *ContentType + CreatedAt string + FirstPublishedAt string + ID string + LinkType string + PublishedAt string + PublishedBy *Sys + PublishedCounter int + PublishedVersion int + Revision int + Space *Space + Type string + UpdatedAt string + UpdatedBy *Sys + Version int + type ValidationFailedError struct + func (e ValidationFailedError) Error() string + type VersionMismatchError struct + func (e VersionMismatchError) Error() string + type Webhook struct + HTTPBasicPassword string + HTTPBasicUsername string + Headers []*WebhookHeader + Name string + Sys *Sys + Topics []string + URL string + func (webhook *Webhook) GetVersion() int + type WebhookHeader struct + Key string + Value string + type WebhooksService service + func (service *WebhooksService) Delete(spaceID string, webhook *Webhook) error + func (service *WebhooksService) Get(spaceID, webhookID string) (*Webhook, error) + func (service *WebhooksService) List(spaceID string) *Collection + func (service *WebhooksService) Upsert(spaceID string, webhook *Webhook) error v0.3.1 Nov 28, 2017