dashboard_admin_client

package
v0.6.1-nightly.b4d8e5e Latest Latest
Warning

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

Go to latest
Published: May 4, 2021 License: MPL-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("NotFound")

Functions

func JoinUrl

func JoinUrl(parts ...string) string

Types

type Client

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

func NewClient

func NewClient(url string, auth string, insecureSkipVerify bool) *Client

func (Client) OrganizationAll

func (c Client) OrganizationAll() ([]v1alpha1.OrganizationSpec, error)

func (Client) OrganizationCreate

func (c Client) OrganizationCreate(spec *v1alpha1.OrganizationSpec) (string, error)

func (Client) OrganizationDelete

func (c Client) OrganizationDelete(orgId string) error

func (Client) OrganizationGet

func (c Client) OrganizationGet(id string) (*v1alpha1.OrganizationSpec, error)

func (Client) OrganizationUpdate

func (c Client) OrganizationUpdate(id string, spec *v1alpha1.OrganizationSpec) (*v1alpha1.OrganizationSpec, error)

func (Client) UserAdminCreate

func (c Client) UserAdminCreate(reqBody CreateUserRequest) (*CreateUserMeta, error)

func (Client) UserAdminDelete

func (c Client) UserAdminDelete(userId string) error

type CreateOrganizationResponse

type CreateOrganizationResponse struct {
	Status  string `json:"Status"`
	Message string `json:"message"`
	Meta    string `json:"meta"`
}

type CreateUserMeta

type CreateUserMeta struct {
	CreateUserRequest
	ID              string `json:"id"`
	AccessKey       string `json:"access_key"`
	UserPermissions struct {
		IsAdmin       string `json:"IsAdmin"`
		ResetPassword string `json:"ResetPassword"`
	} `json:"user_permissions"`
	GroupID string `json:"group_id"`
}

type CreateUserRequest

type CreateUserRequest struct {
	FirstName    string `json:"first_name"`
	LastName     string `json:"last_name"`
	EmailAddress string `json:"email_address"`
	Password     string `json:"password"`
	Active       bool   `json:"active"`
	OrgID        string `json:"org_id"`
}

type CreateUserResponse

type CreateUserResponse struct {
	Status  string         `json:"Status"`
	Message string         `json:"Message"`
	Meta    CreateUserMeta `json:"Meta"`
}

{"Status":"OK","Message":"63da42beed3840bd4cfe69fe3705c9b9","Meta":{"api_model":{},"first_name":"Ahmet","last_name":"Soormally","email_address":"ahmet@tyk.io","org_id":"5f7f958a72a3b40001cb18dc","active":true,"id":"5f7f98427fea06e1b637b2b9","access_key":"63da42beed3840bd4cfe69fe3705c9b9","user_permissions":{"IsAdmin":"admin","ResetPassword":"admin"},"group_id":"","password_max_days":0,"password_updated":"0001-01-01T00:00:00Z","PWHistory":[],"last_login_date":"0001-01-01T00:00:00Z","created_at":"2020-10-08T22:52:50.442Z"}}

type OrganizationsResponse

type OrganizationsResponse struct {
	Organizations []v1alpha1.OrganizationSpec `json:"organisations"`
}

type SetPasswordRequest

type SetPasswordRequest struct {
	NewPassword string `json:"new_password"`
}

Jump to

Keyboard shortcuts

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