storage

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveRegistry

func SaveRegistry(out io.Writer, registry *RegistryDTO) error

Types

type ContextDTO

type ContextDTO struct {
	ID         string        `json:"id"`
	FolderID   *string       `json:"folder_id,omitempty"`
	Name       string        `json:"name"`
	Position   int           `json:"position"`
	Properties []PropertyDTO `json:"properties"`
}

type EndpointDTO

type EndpointDTO struct {
	ID       string      `json:"id"`
	FolderID *string     `json:"folder_id,omitempty"`
	Name     string      `json:"name"`
	Position int         `json:"position"`
	Method   string      `json:"method"`
	URI      string      `json:"uri"`
	Headers  []HeaderDTO `json:"headers"`
	Body     *string     `json:"body,omitempty"`
}

type FolderDTO

type FolderDTO struct {
	ID       string  `json:"id"`
	ParentID *string `json:"parent_id,omitempty"`
	Name     string  `json:"name"`
	Position int     `json:"position"`
}

type HeaderDTO

type HeaderDTO struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type PropertyDTO

type PropertyDTO struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type RegistryDTO

type RegistryDTO struct {
	Folders         []FolderDTO   `json:"folders"`
	Contexts        []ContextDTO  `json:"contexts"`
	Endpoints       []EndpointDTO `json:"endpoints"`
	Workflows       []WorkflowDTO `json:"workflows"`
	ActiveContextID string        `json:"active_context_id"`
}

func LoadRegistry

func LoadRegistry(in io.Reader) (*RegistryDTO, error)

type WorkflowDTO

type WorkflowDTO struct {
	ID       string  `json:"id"`
	FolderID *string `json:"folder_id,omitempty"`
	Name     string  `json:"name"`
	Position int     `json:"position"`
}

Jump to

Keyboard shortcuts

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