Documentation
¶
Index ¶
- func RegisterNetworks(api huma.API, networkSvc *NetworkService, ...)
- type ConnectContainerInput
- type CreateNetworkInput
- type DeleteNetworkInput
- type DisconnectContainerInput
- type GetNetworkCountsInput
- type GetNetworkInput
- type GetNetworkTopologyInput
- type ListNetworksInput
- type ListNetworksOutput
- type NetworkHandler
- func (h *NetworkHandler) ConnectContainer(ctx context.Context, input *ConnectContainerInput) (*handlerutil.Out[base.MessageResponse], error)
- func (h *NetworkHandler) CreateNetwork(ctx context.Context, input *CreateNetworkInput) (*handlerutil.Out[networktypes.CreateResponse], error)
- func (h *NetworkHandler) DeleteNetwork(ctx context.Context, input *DeleteNetworkInput) (*handlerutil.Out[base.MessageResponse], error)
- func (h *NetworkHandler) DisconnectContainer(ctx context.Context, input *DisconnectContainerInput) (*handlerutil.Out[base.MessageResponse], error)
- func (h *NetworkHandler) GetNetwork(ctx context.Context, input *GetNetworkInput) (*handlerutil.Out[networktypes.Inspect], error)
- func (h *NetworkHandler) GetNetworkCounts(ctx context.Context, input *GetNetworkCountsInput) (*handlerutil.Out[networktypes.UsageCounts], error)
- func (h *NetworkHandler) GetNetworkTopology(ctx context.Context, input *GetNetworkTopologyInput) (*handlerutil.Out[networktypes.Topology], error)
- func (h *NetworkHandler) ListNetworks(ctx context.Context, input *ListNetworksInput) (*ListNetworksOutput, error)
- func (h *NetworkHandler) PruneNetworks(ctx context.Context, input *PruneNetworksInput) (*handlerutil.Out[networktypes.PruneReport], error)
- type NetworkService
- func (s *NetworkService) ConnectContainer(ctx context.Context, networkID string, ...) error
- func (s *NetworkService) CreateNetwork(ctx context.Context, name string, options client.NetworkCreateOptions, ...) (*network.CreateResponse, error)
- func (s *NetworkService) DisconnectContainer(ctx context.Context, networkID string, ...) error
- func (s *NetworkService) GetNetworkByID(ctx context.Context, id string) (*network.Inspect, error)
- func (s *NetworkService) GetNetworkTopology(ctx context.Context) (*networktypes.Topology, error)
- func (s *NetworkService) ListNetworksPaginated(ctx context.Context, params pagination.QueryParams) ([]networktypes.Summary, pagination.Response, networktypes.UsageCounts, error)
- func (s *NetworkService) PruneNetworks(ctx context.Context) (*network.PruneReport, error)
- func (s *NetworkService) RemoveNetwork(ctx context.Context, id string, user common.User) error
- type PruneNetworksInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterNetworks ¶
func RegisterNetworks(api huma.API, networkSvc *NetworkService, dockerSvc *docker.DockerClientService, activitySvc *activity.ActivityService, appCtx handlerutil.ActivityAppContext)
RegisterNetworks registers network endpoints.
Types ¶
type ConnectContainerInput ¶ added in v2.9.0
type ConnectContainerInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
NetworkID string `path:"networkId" doc:"Network ID"`
Body networktypes.ConnectContainerRequest
}
type CreateNetworkInput ¶
type CreateNetworkInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
Body networktypes.CreateRequest
}
type DeleteNetworkInput ¶
type DisconnectContainerInput ¶ added in v2.9.0
type DisconnectContainerInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
NetworkID string `path:"networkId" doc:"Network ID"`
Body networktypes.DisconnectContainerRequest
}
type GetNetworkCountsInput ¶
type GetNetworkCountsInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
}
type GetNetworkInput ¶
type GetNetworkTopologyInput ¶
type GetNetworkTopologyInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
}
type ListNetworksInput ¶
type ListNetworksInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
Search string `query:"search" doc:"Search query"`
Sort string `query:"sort" doc:"Column to sort by"`
Order string `query:"order" default:"asc" doc:"Sort direction (asc or desc)"`
Start int `query:"start" default:"0" doc:"Start index for pagination"`
Limit int `query:"limit" default:"20" doc:"Number of items per page"`
InUse string `query:"inUse" doc:"Filter by in-use status (true/false)"`
}
type ListNetworksOutput ¶
type ListNetworksOutput struct {
Body base.PaginatedWithCounts[networktypes.Summary, networktypes.UsageCounts]
}
type NetworkHandler ¶
type NetworkHandler struct {
// contains filtered or unexported fields
}
func (*NetworkHandler) ConnectContainer ¶ added in v2.9.0
func (h *NetworkHandler) ConnectContainer(ctx context.Context, input *ConnectContainerInput) (*handlerutil.Out[base.MessageResponse], error)
func (*NetworkHandler) CreateNetwork ¶
func (h *NetworkHandler) CreateNetwork(ctx context.Context, input *CreateNetworkInput) (*handlerutil.Out[networktypes.CreateResponse], error)
func (*NetworkHandler) DeleteNetwork ¶
func (h *NetworkHandler) DeleteNetwork(ctx context.Context, input *DeleteNetworkInput) (*handlerutil.Out[base.MessageResponse], error)
func (*NetworkHandler) DisconnectContainer ¶ added in v2.9.0
func (h *NetworkHandler) DisconnectContainer(ctx context.Context, input *DisconnectContainerInput) (*handlerutil.Out[base.MessageResponse], error)
func (*NetworkHandler) GetNetwork ¶
func (h *NetworkHandler) GetNetwork(ctx context.Context, input *GetNetworkInput) (*handlerutil.Out[networktypes.Inspect], error)
func (*NetworkHandler) GetNetworkCounts ¶
func (h *NetworkHandler) GetNetworkCounts(ctx context.Context, input *GetNetworkCountsInput) (*handlerutil.Out[networktypes.UsageCounts], error)
func (*NetworkHandler) GetNetworkTopology ¶
func (h *NetworkHandler) GetNetworkTopology(ctx context.Context, input *GetNetworkTopologyInput) (*handlerutil.Out[networktypes.Topology], error)
func (*NetworkHandler) ListNetworks ¶
func (h *NetworkHandler) ListNetworks(ctx context.Context, input *ListNetworksInput) (*ListNetworksOutput, error)
func (*NetworkHandler) PruneNetworks ¶
func (h *NetworkHandler) PruneNetworks(ctx context.Context, input *PruneNetworksInput) (*handlerutil.Out[networktypes.PruneReport], error)
type NetworkService ¶
type NetworkService struct {
// contains filtered or unexported fields
}
func NewNetworkService ¶
func NewNetworkService(db *database.DB, dockerService *docker.DockerClientService, eventService *event.EventService) *NetworkService
func (*NetworkService) ConnectContainer ¶ added in v2.9.0
func (s *NetworkService) ConnectContainer(ctx context.Context, networkID string, req networktypes.ConnectContainerRequest, user common.User) error
ConnectContainer connects a container to a network without recreating it.
func (*NetworkService) CreateNetwork ¶
func (s *NetworkService) CreateNetwork(ctx context.Context, name string, options client.NetworkCreateOptions, user common.User) (*network.CreateResponse, error)
func (*NetworkService) DisconnectContainer ¶ added in v2.9.0
func (s *NetworkService) DisconnectContainer(ctx context.Context, networkID string, req networktypes.DisconnectContainerRequest, user common.User) error
DisconnectContainer disconnects a container from a network.
func (*NetworkService) GetNetworkByID ¶
func (*NetworkService) GetNetworkTopology ¶
func (s *NetworkService) GetNetworkTopology(ctx context.Context) (*networktypes.Topology, error)
func (*NetworkService) ListNetworksPaginated ¶
func (s *NetworkService) ListNetworksPaginated(ctx context.Context, params pagination.QueryParams) ([]networktypes.Summary, pagination.Response, networktypes.UsageCounts, error)
func (*NetworkService) PruneNetworks ¶
func (s *NetworkService) PruneNetworks(ctx context.Context) (*network.PruneReport, error)
func (*NetworkService) RemoveNetwork ¶
type PruneNetworksInput ¶
type PruneNetworksInput struct {
EnvironmentID string `path:"id" doc:"Environment ID"`
}
Click to show internal directories.
Click to hide internal directories.