Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) Create(ctx context.Context, params CreateParams) (*Permission, error)
- func (c *Client) Delete(ctx context.Context, id string) error
- func (c *Client) List(ctx context.Context, params ListParams) ([]Permission, error)
- func (c *Client) Search(ctx context.Context, params SearchParams) (*Permission, error)
- func (c *Client) Update(ctx context.Context, id string, params UpdateParams) error
- type CreateParams
- type CreateResponse
- type ListParams
- type ListResponse
- type ListSortMethod
- type Permission
- type SearchParams
- type UpdateParams
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrPermissionNotFound = fmt.Errorf("permission not found")
)
Functions ¶
This section is empty.
Types ¶
type Client ¶
func (*Client) Create ¶
func (c *Client) Create(ctx context.Context, params CreateParams) (*Permission, error)
https://kinde.com/api/docs/#create-permission
note: only ID will be populated
func (*Client) List ¶
func (c *Client) List(ctx context.Context, params ListParams) ([]Permission, error)
func (*Client) Search ¶
func (c *Client) Search(ctx context.Context, params SearchParams) (*Permission, error)
type CreateParams ¶
type CreateResponse ¶
type CreateResponse struct { Code string `json:"code"` Message string `json:"message"` Permission Permission `json:"permission"` }
type ListParams ¶
type ListParams struct { Sort ListSortMethod PageSize int NextToken string }
type ListResponse ¶
type ListResponse struct { Code string `json:"code"` Message string `json:"message"` NextToken string `json:"next_token"` Permissions []Permission `json:"permissions"` }
func (ListResponse) GetData ¶
func (r ListResponse) GetData() []Permission
func (ListResponse) GetNextToken ¶
func (r ListResponse) GetNextToken() string
type ListSortMethod ¶
type ListSortMethod string
const ( ListSortNameAsc ListSortMethod = "name_asc" ListSortNameDesc ListSortMethod = "name_desc" ListSortIDAsc ListSortMethod = "id_asc" ListSortIDDesc ListSortMethod = "id_desc" )
func (ListSortMethod) Options ¶
func (t ListSortMethod) Options() []ListSortMethod
func (ListSortMethod) Valid ¶
func (t ListSortMethod) Valid() error
type Permission ¶
type SearchParams ¶
type UpdateParams ¶
Click to show internal directories.
Click to hide internal directories.