net

package
v0.1.0-dev.20260307175201 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package net provides network actions for the operation graph.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	op.ProviderBase
}

Provider provides network actions.

+devlore:access=both

func (*Provider) Download

func (p *Provider) Download(url Resource) ([]byte, error)

Download fetches the content at the given URL and returns the response body.

Parameters:

  • url: network resource identifying the URL to fetch

type Resource

type Resource struct {
	op.ResourceBase
	SourceURL *url.URL
}

Resource represents a network resource identified by a URL.

The SourceURL holds the original URL as provided (with transport scheme, original casing, etc.). The canonical URI produced by [URI] strips the transport scheme and normalizes the authority and path components for catalog deduplication.

func (*Resource) Host

func (r *Resource) Host() string

Host returns the lowercased hostname from the source URL.

func (*Resource) Path

func (r *Resource) Path() string

Path returns the raw path from the source URL.

func (*Resource) Scheme

func (r *Resource) Scheme() string

Scheme returns "net".

func (Resource) String

func (r Resource) String() string

String returns a compact JSON representation of the resource.

func (*Resource) URI

func (r *Resource) URI() string

URI returns the canonical net:// URI for catalog lookups.

The URI is transport-independent: http://example.com/f and https://example.com/f produce the same URI. The original transport scheme is available via SourceURL.Scheme.

Jump to

Keyboard shortcuts

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