Documentation
¶
Index ¶
- func Bool(value bool) *bool
- func Int(value int) *int
- func Register(connector *pc.Connector)
- func String(value string) *string
- type Client
- type ConflictError
- type DocumentAttributes
- type GetManyOptions
- type GetManyOutput
- type GetOptions
- type NoSuchPostError
- type Post
- type PostItem
- type PostUpdate
- type UpdateOptions
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client interface {
Get(uid string, options GetOptions) (*PostItem, error)
GetMany(uids []string, options GetManyOptions) (*GetManyOutput, error)
Update(uid string, pu PostUpdate, options UpdateOptions) (*PostItem, error)
}
type ConflictError ¶
type ConflictError struct {
UID string
}
func (ConflictError) Error ¶
func (e ConflictError) Error() string
type DocumentAttributes ¶
type DocumentAttributes map[string]interface{}
type GetManyOptions ¶
type GetManyOutput ¶
type GetManyOutput struct {
Posts []PostItem `json:"posts"`
}
type GetOptions ¶
type GetOptions struct {
Raw *bool
}
type NoSuchPostError ¶
type NoSuchPostError struct {
UID string
}
func (NoSuchPostError) Error ¶
func (e NoSuchPostError) Error() string
type Post ¶
type Post struct {
UID pebble.UID `json:"uid"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Document *json.RawMessage `json:"document,omitempty"`
ExternalDocument *json.RawMessage `json:"external_document,omitempty"`
Sensitive *json.RawMessage `json:"sensitive,omitempty"`
Protected *json.RawMessage `json:"protected,omitempty"`
Tags []string `json:"tags"`
Deleted bool `json:"deleted"`
Published bool `json:"published"`
ExternalID string `json:"external_id"`
Version int `json:"version"`
}
func (*Post) GetDocument ¶
func (post *Post) GetDocument() (DocumentAttributes, error)
func (*Post) GetExternalDocument ¶
func (post *Post) GetExternalDocument() (DocumentAttributes, error)
func (*Post) GetProtected ¶
func (post *Post) GetProtected() (DocumentAttributes, error)
func (*Post) GetSensitive ¶
func (post *Post) GetSensitive() (DocumentAttributes, error)
type PostUpdate ¶
type PostUpdate struct {
CreatedAt *time.Time `json:"created_at,omitempty"`
UpdatedAt *time.Time `json:"updated_at,omitempty"`
Document json.RawMessage `json:"document,omitempty"`
ExternalDocument json.RawMessage `json:"external_document,omitempty"`
Sensitive json.RawMessage `json:"sensitive,omitempty"`
Protected json.RawMessage `json:"protected,omitempty"`
Tags *[]string `json:"tags,omitempty"`
Deleted *bool `json:"deleted,omitempty"`
Published *bool `json:"published,omitempty"`
ExternalID string `json:"external_id,omitempty"`
Version int `json:"version,omitempty"`
}
type UpdateOptions ¶
Click to show internal directories.
Click to hide internal directories.