Documentation
¶
Overview ¶
Service assembly for the admin-side server and node management subdomain of the network module. Only the module facade may reach it.
Index ¶
- Constants
- type CreateNodeLogic
- type CreateServerLogic
- type DeleteNodeLogic
- type DeleteServerLogic
- type Deps
- type FilterNodeListLogic
- type FilterServerListLogic
- type GetServerNodeConfigLogic
- type GetServerProtocolsLogic
- type QueryNodeTagLogic
- type ResetSortWithNodeLogic
- type ResetSortWithServerLogic
- type Service
- func (s *Service) CreateNode(ctx context.Context, req *dto.CreateNodeRequest) error
- func (s *Service) CreateServer(ctx context.Context, req *dto.CreateServerRequest) error
- func (s *Service) DeleteNode(ctx context.Context, req *dto.DeleteNodeRequest) error
- func (s *Service) DeleteServer(ctx context.Context, req *dto.DeleteServerRequest) error
- func (s *Service) FilterNodeList(ctx context.Context, req *dto.FilterNodeListRequest) (*dto.FilterNodeListResponse, error)
- func (s *Service) FilterServerList(ctx context.Context, req *dto.FilterServerListRequest) (*dto.FilterServerListResponse, error)
- func (s *Service) GetServerNodeConfig(ctx context.Context, req *dto.GetServerNodeConfigRequest) (*dto.GetServerNodeConfigResponse, error)
- func (s *Service) GetServerProtocols(ctx context.Context, req *dto.GetServerProtocolsRequest) (*dto.GetServerProtocolsResponse, error)
- func (s *Service) QueryNodeTag(ctx context.Context) (*dto.QueryNodeTagResponse, error)
- func (s *Service) ResetSortWithNode(ctx context.Context, req *dto.ResetSortRequest) error
- func (s *Service) ResetSortWithServer(ctx context.Context, req *dto.ResetSortRequest) error
- func (s *Service) ToggleNodeStatus(ctx context.Context, req *dto.ToggleNodeStatusRequest) error
- func (s *Service) UpdateNode(ctx context.Context, req *dto.UpdateNodeRequest) error
- func (s *Service) UpdateServer(ctx context.Context, req *dto.UpdateServerRequest) error
- func (s *Service) UpdateServerNodeConfig(ctx context.Context, req *dto.UpdateServerNodeConfigRequest) error
- type Snapshot
- type ToggleNodeStatusLogic
- type UpdateNodeLogic
- type UpdateServerLogic
- type UpdateServerNodeConfigLogic
Constants ¶
View Source
const ( ShadowSocks = "shadowsocks" Vmess = "vmess" Vless = "vless" Trojan = "trojan" AnyTLS = "anytls" Tuic = "tuic" Hysteria2 = "hysteria2" ShadowsocksR = "shadowsocksr" Mieru = "mieru" Naive = "naive" Snell = "snell" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateNodeLogic ¶
func (*CreateNodeLogic) CreateNode ¶
func (l *CreateNodeLogic) CreateNode(req *dto.CreateNodeRequest) error
type CreateServerLogic ¶
func (*CreateServerLogic) CreateServer ¶
func (l *CreateServerLogic) CreateServer(req *dto.CreateServerRequest) error
type DeleteNodeLogic ¶
func (*DeleteNodeLogic) DeleteNode ¶
func (l *DeleteNodeLogic) DeleteNode(req *dto.DeleteNodeRequest) error
type DeleteServerLogic ¶
func (*DeleteServerLogic) DeleteServer ¶
func (l *DeleteServerLogic) DeleteServer(req *dto.DeleteServerRequest) error
type Deps ¶
type Deps struct {
Store repository.Store
// Config snapshots the runtime-mutable node settings per request.
Config func() Snapshot
}
Deps declares the subdomain's dependencies; the module facade forwards them from the composition root.
type FilterNodeListLogic ¶
func (*FilterNodeListLogic) FilterNodeList ¶
func (l *FilterNodeListLogic) FilterNodeList(req *dto.FilterNodeListRequest) (resp *dto.FilterNodeListResponse, err error)
type FilterServerListLogic ¶
func (*FilterServerListLogic) FilterServerList ¶
func (l *FilterServerListLogic) FilterServerList(req *dto.FilterServerListRequest) (resp *dto.FilterServerListResponse, err error)
type GetServerNodeConfigLogic ¶
func (*GetServerNodeConfigLogic) GetServerNodeConfig ¶
func (l *GetServerNodeConfigLogic) GetServerNodeConfig(req *dto.GetServerNodeConfigRequest) (*dto.GetServerNodeConfigResponse, error)
type GetServerProtocolsLogic ¶
func (*GetServerProtocolsLogic) GetServerProtocols ¶
func (l *GetServerProtocolsLogic) GetServerProtocols(req *dto.GetServerProtocolsRequest) (resp *dto.GetServerProtocolsResponse, err error)
type QueryNodeTagLogic ¶
func (*QueryNodeTagLogic) QueryNodeTag ¶
func (l *QueryNodeTagLogic) QueryNodeTag() (resp *dto.QueryNodeTagResponse, err error)
type ResetSortWithNodeLogic ¶
func (*ResetSortWithNodeLogic) ResetSortWithNode ¶
func (l *ResetSortWithNodeLogic) ResetSortWithNode(req *dto.ResetSortRequest) error
type ResetSortWithServerLogic ¶
func (*ResetSortWithServerLogic) ResetSortWithServer ¶
func (l *ResetSortWithServerLogic) ResetSortWithServer(req *dto.ResetSortRequest) error
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service is the admin server-management entry point used by the network facade.
func NewService ¶
func (*Service) CreateNode ¶
func (*Service) CreateServer ¶
func (*Service) DeleteNode ¶
func (*Service) DeleteServer ¶
func (*Service) FilterNodeList ¶
func (s *Service) FilterNodeList(ctx context.Context, req *dto.FilterNodeListRequest) (*dto.FilterNodeListResponse, error)
func (*Service) FilterServerList ¶
func (s *Service) FilterServerList(ctx context.Context, req *dto.FilterServerListRequest) (*dto.FilterServerListResponse, error)
func (*Service) GetServerNodeConfig ¶
func (s *Service) GetServerNodeConfig(ctx context.Context, req *dto.GetServerNodeConfigRequest) (*dto.GetServerNodeConfigResponse, error)
func (*Service) GetServerProtocols ¶
func (s *Service) GetServerProtocols(ctx context.Context, req *dto.GetServerProtocolsRequest) (*dto.GetServerProtocolsResponse, error)
func (*Service) QueryNodeTag ¶
func (*Service) ResetSortWithNode ¶
func (*Service) ResetSortWithServer ¶
func (*Service) ToggleNodeStatus ¶
func (*Service) UpdateNode ¶
func (*Service) UpdateServer ¶
func (*Service) UpdateServerNodeConfig ¶
type Snapshot ¶
type Snapshot struct {
Node config.NodeConfig
}
Snapshot is the per-request view of the runtime-mutable node settings.
type ToggleNodeStatusLogic ¶
func (*ToggleNodeStatusLogic) ToggleNodeStatus ¶
func (l *ToggleNodeStatusLogic) ToggleNodeStatus(req *dto.ToggleNodeStatusRequest) error
type UpdateNodeLogic ¶
func (*UpdateNodeLogic) UpdateNode ¶
func (l *UpdateNodeLogic) UpdateNode(req *dto.UpdateNodeRequest) error
type UpdateServerLogic ¶
func (*UpdateServerLogic) UpdateServer ¶
func (l *UpdateServerLogic) UpdateServer(req *dto.UpdateServerRequest) error
type UpdateServerNodeConfigLogic ¶
func (*UpdateServerNodeConfigLogic) UpdateServerNodeConfig ¶
func (l *UpdateServerNodeConfigLogic) UpdateServerNodeConfig(req *dto.UpdateServerNodeConfigRequest) error
Source Files
¶
- constant.go
- createNodeLogic.go
- createServerLogic.go
- deleteNodeLogic.go
- deleteServerLogic.go
- filterNodeListLogic.go
- filterServerListLogic.go
- getServerNodeConfigLogic.go
- getServerProtocolsLogic.go
- protocol_keys.go
- queryNodeTagLogic.go
- resetSortWithNodeLogic.go
- resetSortWithServerLogic.go
- service.go
- toggleNodeStatusLogic.go
- updateNodeLogic.go
- updateServerLogic.go
- updateServerNodeConfigLogic.go
Click to show internal directories.
Click to hide internal directories.