api

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2025 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API interface {
	Init(req InitRequest) error
	Clone(req CloneRequest) error

	Add(req AddRequest) error
	Get(req ReadRequest) (ReadResponse, error)
	Remove(req RemoveRequest) error
	List(req ListRequest) (ListResponse, error)

	Move(req MoveRequest) error
	Copy(req CopyRequest) error
}

API defines api for gostore cli

func New

func New(basePath string) API

type AddRequest

type AddRequest struct {
	Path string
	Key  maybe.Maybe[string]

	Data io.Reader
}

type CloneRequest

type CloneRequest struct {
	ID     string
	Remote string
}

type CopyRequest

type CopyRequest struct {
	Src, Dst string
}

type InitRequest

type InitRequest struct {
	ID         string
	Recipients []string
	Remote     maybe.Maybe[string]
}

type ListNode

type ListNode struct {
	Name  string
	Nodes []ListNode
}

type ListRequest

type ListRequest struct {
	Path maybe.Maybe[string]
}

type ListResponse

type ListResponse struct {
	ListNode
}

type MoveRequest

type MoveRequest struct {
	Src, Dst string
}

type ReadRequest

type ReadRequest struct {
	Path string
	Key  maybe.Maybe[string]
}

type ReadResponse

type ReadResponse struct {
	Data []byte
}

type RemoveRequest

type RemoveRequest struct {
	Path string
	Key  maybe.Maybe[string]
}

Jump to

Keyboard shortcuts

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