cloudentity

package
v1.13.15 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	HeaderAuthorizerURL = "X-Kusk-Authorizer-URL"
	HeaderAPIGroup      = "X-Kusk-API-Group"
)

Functions

This section is empty.

Types

type API

type API struct {
	Path   string `json:"path"`
	Method string `json:"method"`
}

type APIGroups

type APIGroups struct {
	Name string `json:"name"`
	ID   string `json:"id"`
	Apis []API  `json:"apis"`
}

type APIGroupsRequest

type APIGroupsRequest struct {
	APIGroups []APIGroups `json:"api_groups"`
}

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func NewBuilder

func NewBuilder() *Builder

func (*Builder) AddAPI

func (b *Builder) AddAPI(host string, port uint32, id, name, path, method string)

func (*Builder) BuildRequest

func (b *Builder) BuildRequest() map[string]*APIGroupsRequest

func (*Builder) Len

func (b *Builder) Len() int

type Client

type Client struct {
	// contains filtered or unexported fields
}

func New

func New(url string) *Client

func (*Client) GetAPIGroups

func (c *Client) GetAPIGroups(ctx context.Context) ([]APIGroups, error)

func (*Client) PutAPIGroups

func (c *Client) PutAPIGroups(ctx context.Context, req *APIGroupsRequest) error

func (*Client) Validate

func (c *Client) Validate(ctx context.Context, req *ValidateRequest) error

type IdToAPI

type IdToAPI map[string]*APIGroups

type ValidateRequest

type ValidateRequest struct {
	APIGroup    string              `json:"api_group"`
	Method      string              `json:"method"`
	Path        string              `json:"path"`
	Headers     http.Header         `json:"headers"`
	QueryParams map[string][]string `json:"query_params"`
	Body        string              `json:"body"`
}

Jump to

Keyboard shortcuts

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