helpers

package
v0.0.0-...-14027d0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FetchInitData

func FetchInitData(ctx context.Context, q *url.Values) (ResponseInitData, ResponseError)

func FetchListUsers

func FetchListUsers(ctx context.Context, q *url.Values) (ResponseUserList, ResponseError)

func FetchOrganizationInfo

func FetchOrganizationInfo(ctx context.Context, q *url.Values, organizationId string) (ResponseOrganization, ResponseError)

func FetchUserInfo

func FetchUserInfo(ctx context.Context, q *url.Values, userId string) (ResponseUser, ResponseError)

Types

type ResponseActivate

type ResponseActivate struct {
	Data struct {
		State models.State `json:"state"`
	} `json:"data"`
	Meta models.Meta `json:"meta"`
}

type ResponseError

type ResponseError struct {
	Action string `json:"action"`
	Error  error  `json:"error"`
	Status int    `json:"status"`
}

func ActivateOrganization

func ActivateOrganization(ctx context.Context, q *url.Values, organizationId string) ResponseError

func ActivateUser

func ActivateUser(ctx context.Context, q *url.Values, userId string) ResponseError

func DeleteOrganization

func DeleteOrganization(ctx context.Context, q *url.Values, organizationId string) ResponseError

func DeleteUser

func DeleteUser(ctx context.Context, q *url.Values, userId string) ResponseError

func UpdateOrganization

func UpdateOrganization(ctx context.Context, q *url.Values, reqBody requests.RequestOrganizationUpdateBody, organizationId string) ResponseError

func UpdateUser

func UpdateUser(ctx context.Context, q *url.Values, reqBody requests.RequestUserBody, userId string) ResponseError

type ResponseInitData

type ResponseInitData struct {
	Data struct {
		OrganizationTypes []models.OrganizationType `json:"organization_types"`
	} `json:"data"`
	Meta models.Meta `json:"meta"`
}

type ResponseOrganization

type ResponseOrganization struct {
	Data struct {
		Organization models.Organization `json:"organization"`
	} `json:"data"`
	Meta models.Meta `json:"meta"`
}

type ResponseOrganizationCreate

type ResponseOrganizationCreate struct {
	Data struct {
		OrganizationId string `json:"organization_id"`
	} `json:"data"`
	Meta models.Meta `json:"meta"`
}

type ResponseOrganizationList

type ResponseOrganizationList struct {
	Data struct {
		Organizations []models.Organization `json:"organizations"`
	} `json:"data"`
	Meta models.Meta `json:"meta"`
}

type ResponseUser

type ResponseUser struct {
	Data struct {
		Organization models.User `json:"user"`
	} `json:"data"`
	Meta models.Meta `json:"meta"`
}

type ResponseUserCreate

type ResponseUserCreate struct {
	Data struct {
		UserId string `json:"user_id"`
	} `json:"data"`
	Meta models.Meta `json:"meta"`
}

type ResponseUserList

type ResponseUserList struct {
	Data struct {
		Organizations []models.User `json:"users"`
	} `json:"data"`
	Meta models.Meta `json:"meta"`
}

Jump to

Keyboard shortcuts

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