Documentation
¶
Index ¶
- type StrapiRestClient
- func (s StrapiRestClient) Del(col, id string) error
- func (s StrapiRestClient) DelAll(col string) error
- func (s StrapiRestClient) Get(col, slug string, data interface{}) error
- func (s StrapiRestClient) GetAll(col, filter string) []map[string]interface{}
- func (s StrapiRestClient) Post(col string, data interface{}) error
- func (s StrapiRestClient) Put(col string, data interface{}) error
- type StrapiUser
- type StrapiUserRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type StrapiRestClient ¶
type StrapiRestClient struct {
BaseUrl string
}
func New ¶
func New(url string) StrapiRestClient
func NewWithUlr ¶
func NewWithUlr(baseUrl string) (src StrapiRestClient)
func (StrapiRestClient) Del ¶
func (s StrapiRestClient) Del(col, id string) error
func (StrapiRestClient) DelAll ¶
func (s StrapiRestClient) DelAll(col string) error
func (StrapiRestClient) Get ¶
func (s StrapiRestClient) Get(col, slug string, data interface{}) error
func (StrapiRestClient) GetAll ¶
func (s StrapiRestClient) GetAll(col, filter string) []map[string]interface{}
func (StrapiRestClient) Post ¶
func (s StrapiRestClient) Post(col string, data interface{}) error
func (StrapiRestClient) Put ¶
func (s StrapiRestClient) Put(col string, data interface{}) error
type StrapiUser ¶
type StrapiUser struct {
ID int `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
Provider string `json:"provider"`
Confirmed bool `json:"confirmed"`
Blocked bool `json:"blocked"`
Role *StrapiUserRole `json:"role"`
Disabled bool `json:"disabled"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
}
func (*StrapiUser) New ¶
func (su *StrapiUser) New(params map[string]interface{})
type StrapiUserRole ¶
type StrapiUserRole struct {
ID int `json:"id"`
Name string `json:"name"`
Description string `json:"description"`
Type string `json:"type"`
}
func (*StrapiUserRole) New ¶
func (sur *StrapiUserRole) New(params map[string]interface{})
Click to show internal directories.
Click to hide internal directories.