strapi

package
v0.0.0-...-7fcd714 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 7, 2021 License: Unlicense Imports: 8 Imported by: 6

Documentation

Index

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{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL