webapi

package
v0.1.8 Latest Latest
Warning

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

Go to latest
Published: Aug 22, 2024 License: MPL-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client interface {
	CreateOrganization(name, label, billingEmail string) (string, error)
	GetCollections(orgID string) (string, error)
	Login(username, password string, kdfIterations int) error
	RegisterUser(name, username, password string, kdfIterations int) error
}

func NewClient

func NewClient(serverURL string) Client

type Collection

type Collection struct {
	Id             string `json:"id"`
	Name           string `json:"name"`
	OrganizationId int    `json:"organization_id"`
	Object         string `json:"object"`
	ExternalId     string `json:"external_id"`
}

type CollectionResponse

type CollectionResponse struct {
	Data   []Collection `json:"data"`
	Object string       `json:"object"`
}

type CreateOrganizationRequest

type CreateOrganizationRequest struct {
	Name           string  `json:"name"`
	BillingEmail   string  `json:"billingEmail"`
	PlanType       int     `json:"planType"`
	CollectionName string  `json:"collectionName"`
	Key            string  `json:"key"`
	Keys           KeyPair `json:"keys"`
}

type CreateOrganizationResponse

type CreateOrganizationResponse struct {
	Id string `json:"id"`
}

type KeyPair

type KeyPair struct {
	PublicKey           string `json:"publicKey"`
	EncryptedPrivateKey string `json:"encryptedPrivateKey"`
}

type SignupRequest

type SignupRequest struct {
	Email              string  `json:"email"`
	Name               string  `json:"name"`
	MasterPasswordHash string  `json:"masterPasswordHash"`
	Key                string  `json:"key"`
	Kdf                int     `json:"kdf"`
	KdfIterations      int     `json:"kdfIterations"`
	Keys               KeyPair `json:"keys"`
}

type TokenResponse

type TokenResponse struct {
	Kdf                 int    `json:"Kdf"`
	KdfIterations       int    `json:"KdfIterations"`
	Key                 string `json:"Key"`
	PrivateKey          string `json:"PrivateKey"`
	ResetMasterPassword bool   `json:"ResetMasterPassword"`
	AccessToken         string `json:"access_token"`
	ExpireIn            int    `json:"expires_in"`
	RefreshToken        string `json:"refresh_token"`
	Scope               string `json:"scope"`
	TokenType           string `json:"token_type"`
	UnofficialServer    bool   `json:"unofficialServer"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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