state

package
v0.1.0-beta Latest Latest
Warning

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

Go to latest
Published: May 24, 2024 License: BSD-3-Clause Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ActionAdd    Action = "add"
	ActionUpdate Action = "update"
	ActionDelete Action = "delete"

	SourceView        Source = "view"
	SourceFile        Source = "file"
	SourceController  Source = "controller"
	SourceRestService Source = "reset-service"
)

Variables

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

Functions

This section is empty.

Types

type Action

type Action string

type ActiveEnvironmentChangeListener

type ActiveEnvironmentChangeListener func(*domain.Environment)

type ActiveWorkspaceChangeListener

type ActiveWorkspaceChangeListener func(*domain.Workspace)

type CollectionChangeListener

type CollectionChangeListener func(collection *domain.Collection, action Action)

type EnvironmentChangeListener

type EnvironmentChangeListener func(environment *domain.Environment, source Source, action Action)

type Environments

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

func NewEnvironments

func NewEnvironments(repository repository.Repository) *Environments

func (*Environments) AddActiveEnvironmentChangeListener

func (m *Environments) AddActiveEnvironmentChangeListener(listener ActiveEnvironmentChangeListener)

func (*Environments) AddEnvironment

func (m *Environments) AddEnvironment(environment *domain.Environment, source Source)

func (*Environments) AddEnvironmentChangeListener

func (m *Environments) AddEnvironmentChangeListener(listener EnvironmentChangeListener)

func (*Environments) ClearActiveEnvironment

func (m *Environments) ClearActiveEnvironment()

func (*Environments) GetActiveEnvironment

func (m *Environments) GetActiveEnvironment() *domain.Environment

func (*Environments) GetEnvironment

func (m *Environments) GetEnvironment(id string) *domain.Environment

func (*Environments) GetEnvironmentFromDisc

func (m *Environments) GetEnvironmentFromDisc(id string) (*domain.Environment, error)

func (*Environments) GetEnvironments

func (m *Environments) GetEnvironments() []*domain.Environment

func (*Environments) LoadEnvironmentsFromDisk

func (m *Environments) LoadEnvironmentsFromDisk() ([]*domain.Environment, error)

func (*Environments) ReloadEnvironmentFromDisc

func (m *Environments) ReloadEnvironmentFromDisc(id string, source Source)

func (*Environments) RemoveEnvironment

func (m *Environments) RemoveEnvironment(environment *domain.Environment, source Source, stateOnly bool) error

func (*Environments) SetActiveEnvironment

func (m *Environments) SetActiveEnvironment(environment *domain.Environment)

func (*Environments) UpdateEnvironment

func (m *Environments) UpdateEnvironment(env *domain.Environment, source Source, stateOnly bool) error

type RequestChangeListener

type RequestChangeListener func(request *domain.Request, action Action)

type Requests

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

func NewRequests

func NewRequests(repository repository.Repository) *Requests

func (*Requests) AddCollection

func (m *Requests) AddCollection(collection *domain.Collection)

func (*Requests) AddCollectionChangeListener

func (m *Requests) AddCollectionChangeListener(listener CollectionChangeListener)

func (*Requests) AddRequest

func (m *Requests) AddRequest(request *domain.Request)

func (*Requests) AddRequestChangeListener

func (m *Requests) AddRequestChangeListener(listener RequestChangeListener)

func (*Requests) AddRequestToCollection

func (m *Requests) AddRequestToCollection(collection *domain.Collection, request *domain.Request)

func (*Requests) GetCollection

func (m *Requests) GetCollection(id string) *domain.Collection

func (*Requests) GetCollections

func (m *Requests) GetCollections() []*domain.Collection

func (*Requests) GetRequest

func (m *Requests) GetRequest(id string) *domain.Request

func (*Requests) GetRequestFromDisc

func (m *Requests) GetRequestFromDisc(id string) (*domain.Request, error)

func (*Requests) GetRequests

func (m *Requests) GetRequests() []*domain.Request

func (*Requests) LoadCollectionsFromDisk

func (m *Requests) LoadCollectionsFromDisk() ([]*domain.Collection, error)

func (*Requests) LoadRequestsFromDisk

func (m *Requests) LoadRequestsFromDisk() ([]*domain.Request, error)

func (*Requests) ReloadRequestFromDisc

func (m *Requests) ReloadRequestFromDisc(id string)

func (*Requests) RemoveCollection

func (m *Requests) RemoveCollection(collection *domain.Collection, stateOnly bool) error

func (*Requests) RemoveRequest

func (m *Requests) RemoveRequest(request *domain.Request, stateOnly bool) error

func (*Requests) UpdateCollection

func (m *Requests) UpdateCollection(collection *domain.Collection, stateOnly bool) error

func (*Requests) UpdateRequest

func (m *Requests) UpdateRequest(request *domain.Request, stateOnly bool) error

type Source

type Source string

type WorkspaceChangeListener

type WorkspaceChangeListener func(workspace *domain.Workspace, source Source, action Action)

type Workspaces

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

func NewWorkspaces

func NewWorkspaces(repository repository.Repository) *Workspaces

func (*Workspaces) AddActiveWorkspaceChangeListener

func (m *Workspaces) AddActiveWorkspaceChangeListener(listener ActiveWorkspaceChangeListener)

func (*Workspaces) AddWorkspace

func (m *Workspaces) AddWorkspace(workspace *domain.Workspace, source Source)

func (*Workspaces) AddWorkspaceChangeListener

func (m *Workspaces) AddWorkspaceChangeListener(listener WorkspaceChangeListener)

func (*Workspaces) ClearActiveWorkspace

func (m *Workspaces) ClearActiveWorkspace()

func (*Workspaces) GetActiveWorkspace

func (m *Workspaces) GetActiveWorkspace() *domain.Workspace

func (*Workspaces) GetWorkspace

func (m *Workspaces) GetWorkspace(id string) *domain.Workspace

func (*Workspaces) GetWorkspaces

func (m *Workspaces) GetWorkspaces() []*domain.Workspace

func (*Workspaces) LoadWorkspacesFromDisk

func (m *Workspaces) LoadWorkspacesFromDisk() ([]*domain.Workspace, error)

func (*Workspaces) RemoveWorkspace

func (m *Workspaces) RemoveWorkspace(workspace *domain.Workspace, source Source, stateOnly bool) error

func (*Workspaces) SetActiveWorkspace

func (m *Workspaces) SetActiveWorkspace(workspace *domain.Workspace)

func (*Workspaces) UpdateWorkspace

func (m *Workspaces) UpdateWorkspace(workspace *domain.Workspace, source Source, stateOnly bool) error

Jump to

Keyboard shortcuts

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