Documentation ¶
Index ¶
- type Client
- func (c *Client) CreateContentType(g *schema.ContentType) (*schema.ContentType, error)
- func (c *Client) CreateGlobalField(g *schema.GlobalField) (*schema.GlobalField, error)
- func (c *Client) CreateLocale(code, name, fallbackCode string) (*schema.Locale, error)
- func (c *Client) CreatePublishingEnvironment(g *schema.SingleEnvironmentWrapper) (*schema.SingleEnvironmentWrapper, error)
- func (c *Client) DeleteContentType(uid string) error
- func (c *Client) DeleteGlobalField(uid string) error
- func (c *Client) DeleteLocale(code string) error
- func (c *Client) DeletePublishingEnvironment(name string) error
- func (c *Client) GetAllContentTypes(includeCount int64, includeGlobalFieldSchema bool) ([]schema.ContentType, error)
- func (c *Client) GetAllGlobalFields() ([]schema.GlobalField, error)
- func (c *Client) GetAllLocales() ([]schema.Locale, error)
- func (c *Client) GetAllPublishingEnvironments() ([]schema.Environment, error)
- func (c *Client) GetOneContentType(uid string) (*schema.ContentType, error)
- func (c *Client) GetOneGlobalField(uid string) (*schema.GlobalField, error)
- func (c *Client) GetOneLocale(name string) (*schema.Locale, error)
- func (c *Client) GetOnePublishingEnvironment(name string) (*schema.Environment, error)
- func (c *Client) GetUser() (*schema.User, error)
- func (c *Client) UpdateContentType(g *schema.ContentType) (*schema.ContentType, error)
- func (c *Client) UpdateGlobalField(g *schema.GlobalField) (*schema.GlobalField, error)
- func (c *Client) UpdateLocale(e *schema.Locale) (*schema.Locale, error)
- func (c *Client) UpdatePublishingEnvironment(e *schema.Environment) (*schema.Environment, error)
- type Configuration
- type GetContentTypesResponse
- type GetGlobalFieldsResponse
- type GetOneContentTypeResponse
- type GetOneGlobalFieldResponse
- type GetOneLocaleResult
- type LocaleCreateRequest
- type LocaleListWrapper
- type LocaleUpdateRequest
- type UpsertContentTypeRequestBody
- type UpsertContentTypeResponse
- type UpsertGlobalFieldRequestBody
- type UpsertGlobalFieldResponse
- type UpsertLocaleResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct { Configuration // contains filtered or unexported fields }
func NewClient ¶
func NewClient(cfg *Configuration) (*Client, error)
func (*Client) CreateContentType ¶
func (c *Client) CreateContentType(g *schema.ContentType) (*schema.ContentType, error)
func (*Client) CreateGlobalField ¶
func (c *Client) CreateGlobalField(g *schema.GlobalField) (*schema.GlobalField, error)
func (*Client) CreateLocale ¶ added in v0.4.0
func (*Client) CreatePublishingEnvironment ¶ added in v0.3.0
func (c *Client) CreatePublishingEnvironment(g *schema.SingleEnvironmentWrapper) (*schema.SingleEnvironmentWrapper, error)
func (*Client) DeleteContentType ¶
func (*Client) DeleteGlobalField ¶
func (*Client) DeleteLocale ¶ added in v0.4.0
func (*Client) DeletePublishingEnvironment ¶ added in v0.3.0
func (*Client) GetAllContentTypes ¶
func (*Client) GetAllGlobalFields ¶
func (c *Client) GetAllGlobalFields() ([]schema.GlobalField, error)
func (*Client) GetAllLocales ¶ added in v0.4.0
func (*Client) GetAllPublishingEnvironments ¶ added in v0.3.0
func (c *Client) GetAllPublishingEnvironments() ([]schema.Environment, error)
func (*Client) GetOneContentType ¶
func (c *Client) GetOneContentType(uid string) (*schema.ContentType, error)
func (*Client) GetOneGlobalField ¶
func (c *Client) GetOneGlobalField(uid string) (*schema.GlobalField, error)
func (*Client) GetOneLocale ¶ added in v0.4.0
func (*Client) GetOnePublishingEnvironment ¶ added in v0.3.0
func (c *Client) GetOnePublishingEnvironment(name string) (*schema.Environment, error)
func (*Client) UpdateContentType ¶
func (c *Client) UpdateContentType(g *schema.ContentType) (*schema.ContentType, error)
func (*Client) UpdateGlobalField ¶
func (c *Client) UpdateGlobalField(g *schema.GlobalField) (*schema.GlobalField, error)
func (*Client) UpdateLocale ¶ added in v0.4.0
func (*Client) UpdatePublishingEnvironment ¶ added in v0.3.0
func (c *Client) UpdatePublishingEnvironment(e *schema.Environment) (*schema.Environment, error)
type Configuration ¶
type Configuration struct { Host string `yaml:"host" env:"CS_MANAGEMENT_API_HOST" env-default:"https://api.contentstack.io"` Key string `yaml:"key" env:"CS_MANAGEMENT_API_KEY" env-default:""` Token string `yaml:"token" env:"CS_MANAGEMENT_API_TOKEN" env-default:""` Debug bool `yaml:"debug" env:"CS_MANAGEMENT_API_DEBUG" env-default:"false"` UserAgent string `yaml:"user_agent" env:"CS_MANAGEMENT_API_USER_AGENT" env-default:"go-contentstack API client"` }
type GetContentTypesResponse ¶
type GetContentTypesResponse struct {
ContentTypes []schema.ContentType `json:"content_types"`
}
type GetGlobalFieldsResponse ¶
type GetGlobalFieldsResponse struct {
GlobalFields []schema.GlobalField `json:"global_fields"`
}
type GetOneContentTypeResponse ¶
type GetOneContentTypeResponse struct {
ContentType *schema.ContentType `json:"content_type"`
}
type GetOneGlobalFieldResponse ¶
type GetOneGlobalFieldResponse struct {
GlobalField *schema.GlobalField `json:"global_field"`
}
type GetOneLocaleResult ¶ added in v0.4.0
type LocaleCreateRequest ¶ added in v0.4.0
type LocaleListWrapper ¶ added in v0.4.0
type LocaleUpdateRequest ¶ added in v0.4.0
type UpsertContentTypeRequestBody ¶
type UpsertContentTypeRequestBody struct {
ContentType *schema.ContentType `json:"content_type"`
}
type UpsertContentTypeResponse ¶
type UpsertContentTypeResponse struct { Notice string `json:"notice"` ContentType *schema.ContentType `json:"content_type"` }
type UpsertGlobalFieldRequestBody ¶
type UpsertGlobalFieldRequestBody struct {
GlobalField *schema.GlobalField `json:"global_field"`
}
type UpsertGlobalFieldResponse ¶
type UpsertGlobalFieldResponse struct { Notice string `json:"notice"` GlobalField *schema.GlobalField `json:"global_field"` }
type UpsertLocaleResult ¶ added in v0.4.0
Click to show internal directories.
Click to hide internal directories.