network

package
v2.8.1 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2026 License: BSD-3-Clause Imports: 32 Imported by: 0

Documentation

Index

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 CreateNetworkInput

type CreateNetworkInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          networktypes.CreateRequest
}

type CreateNetworkOutput

type CreateNetworkOutput struct {
	Body base.ApiResponse[networktypes.CreateResponse]
}

type DeleteNetworkInput

type DeleteNetworkInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NetworkID     string `path:"networkId" doc:"Network ID"`
}

type DeleteNetworkOutput

type DeleteNetworkOutput struct {
	Body base.ApiResponse[base.MessageResponse]
}

type GetNetworkCountsInput

type GetNetworkCountsInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type GetNetworkCountsOutput

type GetNetworkCountsOutput struct {
	Body base.ApiResponse[networktypes.UsageCounts]
}

type GetNetworkInput

type GetNetworkInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	NetworkID     string `path:"networkId" doc:"Network ID"`
	Sort          string `query:"sort" default:"name"`
	Order         string `query:"order" default:"asc"`
}

type GetNetworkOutput

type GetNetworkOutput struct {
	Body base.ApiResponse[networktypes.Inspect]
}

type GetNetworkTopologyInput

type GetNetworkTopologyInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type GetNetworkTopologyOutput

type GetNetworkTopologyOutput struct {
	Body base.ApiResponse[networktypes.Topology]
}

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 NetworkHandler

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

func (*NetworkHandler) CreateNetwork

func (h *NetworkHandler) CreateNetwork(ctx context.Context, input *CreateNetworkInput) (*CreateNetworkOutput, error)

func (*NetworkHandler) DeleteNetwork

func (h *NetworkHandler) DeleteNetwork(ctx context.Context, input *DeleteNetworkInput) (*DeleteNetworkOutput, error)

func (*NetworkHandler) GetNetwork

func (h *NetworkHandler) GetNetwork(ctx context.Context, input *GetNetworkInput) (*GetNetworkOutput, error)

func (*NetworkHandler) GetNetworkCounts

func (h *NetworkHandler) GetNetworkCounts(ctx context.Context, input *GetNetworkCountsInput) (*GetNetworkCountsOutput, error)

func (*NetworkHandler) GetNetworkTopology

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) (*PruneNetworksOutput, 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) CreateNetwork

func (s *NetworkService) CreateNetwork(ctx context.Context, name string, options client.NetworkCreateOptions, user common.User) (*network.CreateResponse, error)

func (*NetworkService) GetNetworkByID

func (s *NetworkService) GetNetworkByID(ctx context.Context, id string) (*network.Inspect, error)

func (*NetworkService) GetNetworkTopology

func (s *NetworkService) GetNetworkTopology(ctx context.Context) (*networktypes.Topology, error)

func (*NetworkService) PruneNetworks

func (s *NetworkService) PruneNetworks(ctx context.Context) (*network.PruneReport, error)

func (*NetworkService) RemoveNetwork

func (s *NetworkService) RemoveNetwork(ctx context.Context, id string, user common.User) error

type PruneNetworksInput

type PruneNetworksInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
}

type PruneNetworksOutput

type PruneNetworksOutput struct {
	Body base.ApiResponse[networktypes.PruneReport]
}

Jump to

Keyboard shortcuts

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