applications

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: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Application

type Application struct {
	ID           string `json:"id"`
	Name         string `json:"name"`
	Type         Type   `json:"type"`
	ClientID     string `json:"client_id"`
	ClientSecret string `json:"client_secret"`
}

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

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) (*Application, error)

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

note: client_secret will not be populated for spa applications

func (*Client) List

func (c *Client) List(ctx context.Context, params ListParams) ([]Application, error)

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

note: only id, name, and type will be populated

func (*Client) Update

func (c *Client) Update(ctx context.Context, id string, params UpdateParams) error

https://kinde.com/api/docs/#update-application

note: api doesn't return anything meaningful

type CreateParams

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

type CreateResponse

type CreateResponse struct {
	Code        string      `json:"code"`
	Message     string      `json:"message"`
	Application Application `json:"application"`
}

type GetResponse

type GetResponse struct {
	Code        string      `json:"code"`
	Message     string      `json:"message"`
	Application Application `json:"application"`
}

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"`
	Applications []Application `json:"applications"`
}

type ListSortMethod

type ListSortMethod string
const (
	ListSortMethodNameAsc  ListSortMethod = "name_asc"
	ListSortMethodNameDesc ListSortMethod = "name_desc"
)

func (ListSortMethod) Options

func (t ListSortMethod) Options() []ListSortMethod

func (ListSortMethod) Valid

func (t ListSortMethod) Valid() error

type Type

type Type string
const (
	TypeRegular               Type = "reg"
	TypeSinglePageApplication Type = "spa"
	TypeMachineToMachine      Type = "m2m"
)

func (Type) Options

func (t Type) Options() []Type

func (Type) Valid

func (t Type) Valid() error

type UpdateParams

type UpdateParams struct {
	Name         string   `json:"name,omitempty"`
	LanguageKey  string   `json:"language_key,omitempty"`
	LogoutURIs   []string `json:"logout_uris,omitempty"`
	RedirectURIs []string `json:"redirect_uris,omitempty"`
	LoginURI     string   `json:"login_uri,omitempty"`
	HomepageURI  string   `json:"homepage_uri,omitempty"`
}

Jump to

Keyboard shortcuts

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