state

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: BSD-3-Clause Imports: 4 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 = "rest-service"
	SourceGRPCService    Source = "grpc-service"
	SourceGraphQLService Source = "graphql-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.RepositoryV2) *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) GetEnvironments

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

func (*Environments) GetPersistedEnvironment added in v0.3.4

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

func (*Environments) LoadEnvironments added in v0.3.4

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

func (*Environments) ReloadEnvironment added in v0.3.4

func (m *Environments) ReloadEnvironment(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 ProtoFileChangeListener

type ProtoFileChangeListener func(request *domain.ProtoFile, action Action)

type ProtoFiles

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

func NewProtoFiles

func NewProtoFiles(repository repository.RepositoryV2) *ProtoFiles

func (*ProtoFiles) AddProtoFile

func (m *ProtoFiles) AddProtoFile(proto *domain.ProtoFile)

func (*ProtoFiles) AddProtoFileChangeListener

func (m *ProtoFiles) AddProtoFileChangeListener(listener ProtoFileChangeListener)

func (*ProtoFiles) GetProtoFile

func (m *ProtoFiles) GetProtoFile(id string) *domain.ProtoFile

func (*ProtoFiles) GetProtoFiles

func (m *ProtoFiles) GetProtoFiles() []*domain.ProtoFile

func (*ProtoFiles) LoadProtoFiles added in v0.3.4

func (m *ProtoFiles) LoadProtoFiles() ([]*domain.ProtoFile, error)

func (*ProtoFiles) RemoveProtoFile

func (m *ProtoFiles) RemoveProtoFile(proto *domain.ProtoFile, stateOnly bool) error

func (*ProtoFiles) UpdateProtoFile

func (m *ProtoFiles) UpdateProtoFile(proto *domain.ProtoFile, 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.RepositoryV2) *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) GetPersistedRequest added in v0.3.4

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

func (*Requests) GetRequest

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

func (*Requests) GetRequests

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

func (*Requests) GetStandAloneRequests added in v0.2.7

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

func (*Requests) LoadCollections added in v0.3.4

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

func (*Requests) LoadRequests added in v0.3.4

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

func (*Requests) ReloadRequest added in v0.3.4

func (m *Requests) ReloadRequest(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) error

func (*Requests) UpdateCollection

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

func (*Requests) UpdateRequest

func (m *Requests) UpdateRequest(request *domain.Request) 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.RepositoryV2) (*Workspaces, error)

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) LoadWorkspaces added in v0.3.4

func (m *Workspaces) LoadWorkspaces() ([]*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