apis

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	ID              string           `json:"id"`
	Name            string           `json:"name"`
	Audience        string           `json:"audience"`
	IsManagementAPI bool             `json:"is_management_api"`
	Applications    []APIApplication `json:"applications,omitempty"`
}

https://kinde.com/api/docs/#kinde-management-api-apis

type APIApplication

type APIApplication struct {
	ID       string `json:"id"`
	Name     string `json:"name"`
	Type     string `json:"type"`
	IsActive *bool  `json:"is_active"`
}

type ApplicationAuthorization

type ApplicationAuthorization struct {
	ID string `json:"id"`
	// leave empty to assign, set to "delete" to unassign
	Operation string `json:"operation,omitempty"`
}

type AuthorizeApplicationsParams

type AuthorizeApplicationsParams struct {
	Applications []ApplicationAuthorization `json:"applications"`
}

type AuthorizeApplicationsResponse

type AuthorizeApplicationsResponse struct {
	Code                     string   `json:"code"`
	Message                  string   `json:"message"`
	ApplicationsDisconnected []string `json:"applications_disconnected"`
	ApplicationsConnected    []string `json:"applications_connected"`
}

type Client

type Client struct {
	client.Client
}

func New

func New(client client.Client) *Client

func (*Client) Create

func (c *Client) Create(ctx context.Context, params CreateParams) (*API, error)

https://kinde.com/api/docs/#create-api

note: only ID will be populated

func (*Client) Get

func (c *Client) Get(ctx context.Context, id string) (*API, error)

https://kinde.com/api/docs/#get-api

func (*Client) List

func (c *Client) List(ctx context.Context) ([]API, error)

https://kinde.com/api/docs/#get-apis

todo: pagination

type CreateParams

type CreateParams struct {
	Name     string `json:"name"`
	Audience string `json:"audience"`
}

type CreateResponse

type CreateResponse struct {
	Code    string `json:"code"`
	Message string `json:"message"`
	API     API    `json:"api"`
}

type DeleteResponse

type DeleteResponse struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type GetResponse

type GetResponse CreateResponse

type ListResponse

type ListResponse struct {
	Code      string `json:"code"`
	Message   string `json:"message"`
	NextToken string `json:"next_token"`
	APIs      []API  `json:"apis"`
}

Jump to

Keyboard shortcuts

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