Documentation
¶
Index ¶
- Variables
- func BoolPtr(v bool) *bool
- func StrPtr(v string) *string
- type ACL
- type BlockSet
- type Choice
- type ContentType
- type ContentTypeAbilities
- type DefaultACL
- type EnumField
- type Environment
- type EnvironmentListWrapper
- type EnvironmentUpsertRequest
- type ErrorMessages
- type Field
- type FieldMetadata
- type File
- type FilePublishDetails
- type GlobalField
- type LastActivity
- type Locale
- type LocaleURLPair
- type Options
- type Role
- type Rule
- type SingleEnvironmentWrapper
- type StrArray
- type SysACL
- type UpsertEnvironmentResponse
- type User
- type UserResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUnsupportedType is returned if the type is not implemented ErrUnsupportedType = errors.New("unsupported type") )
Functions ¶
Types ¶
type BlockSet ¶
type BlockSet struct { Title string `json:"title"` Uid string `json:"uid"` Schema []Field `json:"schema"` }
BlockSet is a way to group fields
type ContentType ¶
type ContentType struct { Title string `json:"title"` Description string `json:"description"` Options Options `json:"options"` Schema []Field `json:"schema"` UID string `json:"uid"` DefaultACL DefaultACL `json:"DEFAULT_ACL"` SysACL SysACL `json:"SYS_ACL"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` InbuiltClass bool `json:"inbuilt_class"` Abilities ContentTypeAbilities `json:"abilities"` LastActivity LastActivity `json:"last_activity"` MaintainRevisions bool `json:"maintain_revisions"` Version int64 `json:"_version"` Url string `json:"url,omitempty"` }
type ContentTypeAbilities ¶
type DefaultACL ¶
type DefaultACL struct { Others ACL `json:"others"` Users []interface{} `json:"users"` }
type Environment ¶ added in v0.3.0
type Environment struct { Name string `json:"name"` Urls []LocaleURLPair `json:"urls"` UID string `json:"uid"` CreatedBy string `json:"created_by"` UpdatedBy string `json:"updated_by"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` ACL interface{} `json:"ACL"` Tags interface{} `json:"tags"` Version int `json:"_version"` DeployContent bool `json:"deploy_content"` }
type EnvironmentListWrapper ¶ added in v0.3.0
type EnvironmentListWrapper struct {
Environments []Environment `json:"environments"`
}
type EnvironmentUpsertRequest ¶ added in v0.3.0
type EnvironmentUpsertRequest struct {
Environment Environment `json:"environment"`
}
type ErrorMessages ¶
type ErrorMessages struct {
Format string `json:"format"`
}
type Field ¶
type Field struct { DataType string `json:"data_type"` DisplayName string `json:"display_name"` Uid string `json:"uid"` FieldMetadata FieldMetadata `json:"field_metadata"` Format *string `json:"format,omitempty"` ErrorMessages *ErrorMessages `json:"error_messages,omitempty"` Mandatory bool `json:"mandatory"` Multiple bool `json:"multiple"` NonLocalizable *bool `json:"non_localizable,omitempty"` Unique *bool `json:"unique,omitempty"` Indexed *bool `json:"indexed,omitempty"` InbuiltModel *bool `json:"inbuilt_model,omitempty"` Blocks []BlockSet `json:"blocks,omitempty"` ReferenceTo StrArray `json:"reference_to,omitempty"` DisplayType *string `json:"display_type,omitempty"` Enum *EnumField `json:"enum,omitempty"` }
type FieldMetadata ¶
type FieldMetadata struct { Description string `json:"description"` Default *bool `json:"_default,omitempty"` DefaultValue interface{} `json:"default_value,omitempty"` Placeholder *string `json:"placeholder,omitempty"` Instruction *string `json:"instruction,omitempty"` Version *int64 `json:"version,omitempty"` }
func (FieldMetadata) IsDefaultValue ¶
func (f FieldMetadata) IsDefaultValue() bool
type File ¶
type File struct { SchemaVersion int64 `json:"_version"` ACL map[string]interface{} `json:"acl"` ContentType string `json:"content_type"` CreatedAt string `json:"created_at,omitempty"` CreatedBy string `json:"created_by,omitempty"` FileSize string `json:"file_size,omitempty"` Filename string `json:"filename,omitempty"` IsDir *bool `json:"is_dir,omitempty"` ParentUID string `json:"parent_uid,omitempty"` PublishDetails *FilePublishDetails `json:"publish_details,omitempty"` Tags []string `json:"tags"` Title string `json:"title"` UID string `json:"uid"` Url string `json:"url"` UpdatedAt string `json:"updated_at,omitempty"` UpdatedBy string `json:"updated_by,omitempty"` }
File is one of the predefined ContentTypes
type FilePublishDetails ¶
type GlobalField ¶
type GlobalField struct { CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Title string `json:"title"` UID string `json:"uid"` Version *int64 `json:"_version,omitempty"` InbuiltClass *bool `json:"inbuilt_class,omitempty"` Schema []Field `json:"schema"` MaintainRevisions bool `json:"maintain_revisions"` Description string `json:"description"` LastActivity *LastActivity `json:"last_activity,omitempty"` }
type LastActivity ¶
type LastActivity interface{}
type Locale ¶ added in v0.4.0
type Locale struct { Code string `json:"code"` Uid string `json:"uid"` CreatedBy string `json:"created_by"` UpdatedBy string `json:"updated_by"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Name string `json:"name"` //ACL struct {} `json:"ACL"` Version int `json:"_version"` FallbackLocaleCode string `json:"fallback_locale"` }
type LocaleURLPair ¶ added in v0.3.0
type SingleEnvironmentWrapper ¶ added in v0.3.0
type SingleEnvironmentWrapper struct {
Environment Environment `json:"environment"`
}
type StrArray ¶
type StrArray []string
StrArray string array to be used on JSON UnmarshalJSON adapted from: https://gist.github.com/crgimenes/c3b8b4fcce8529e9201f83c8da134f32
func (*StrArray) MarshalJSON ¶
MarshalJSON provides custom marshalling for a S
func (*StrArray) UnmarshalJSON ¶
UnmarshalJSON convert JSON object array of string or a string format strings to a golang string array
type UpsertEnvironmentResponse ¶ added in v0.3.0
type UpsertEnvironmentResponse struct { SingleEnvironmentWrapper Notice string `json:"notice"` }
type User ¶
type User struct { Uid string `json:"uid"` CreatedAt string `json:"created_at"` UpdatedAt string `json:"updated_at"` Email string `json:"email"` Username string `json:"username"` FirstName string `json:"first_name"` LastName string `json:"last_name"` Company string `json:"company"` OrgUid []string `json:"org_uid"` MobileNumber string `json:"mobile_number"` CountryCode string `json:"country_code"` TfaStatus string `json:"tfa_status"` AuthyID string `json:"authy_id"` Active bool `json:"active"` FailedAttempts int64 `json:"failed_attempts"` Authtoken string `json:"authtoken"` Roles []Role `json:"roles"` }
type UserResponse ¶
type UserResponse struct {
User User `json:"user"`
}
Click to show internal directories.
Click to hide internal directories.