fetch

package
v0.0.0-...-672176f Latest Latest
Warning

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

Go to latest
Published: Dec 19, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DB *sqlx.DB
	// contains filtered or unexported fields
}

database configs

func New

func New(opts ...func(*Config)) (*Config, error)

New returns a new Config with the given options

func (*Config) Close

func (c *Config) Close() error

Close closes the database connection

type Entry

type Entry struct {
	Timestamp                string  `db:"timestamp"`
	ClientIP                 string  `db:"client_ip"`
	Status                   int     `db:"status"`
	Bytes                    int64   `db:"bytes"`
	Method                   string  `db:"method"`
	Protocol                 string  `db:"protocol"`
	Host                     string  `db:"host"`
	UriStem                  string  `db:"uri_stem"`
	EdgeLocation             string  `db:"edge_location"`
	EdgeRequestID            string  `db:"edge_request_id"`
	HostHeader               string  `db:"host_header"`
	TimeTaken                float64 `db:"time_taken"`
	ProtoVersion             string  `db:"proto_version"`
	IPVersion                string  `db:"ip_version"`
	UserAgent                string  `db:"user_agent"`
	Referer                  string  `db:"referer"`
	Cookie                   string  `db:"cookie"`
	UriQuery                 string  `db:"uri_query"`
	EdgeResponseResultType   string  `db:"edge_response_result_type"`
	SslProtocol              string  `db:"ssl_protocol"`
	SslCipher                string  `db:"ssl_cipher"`
	EdgeResultType           string  `db:"edge_result_type"`
	ContentType              string  `db:"content_type"`
	ContentLength            int64   `db:"content_length"`
	EdgeDetailedResultType   string  `db:"edge_detailed_result_type"`
	Country                  string  `db:"country"`
	CacheBehaviorPathPattern string  `db:"cache_behavior_path_pattern"`
	Year                     string  `db:"year"`
	Month                    string  `db:"month"`
	Day                      string  `db:"day"`
}

Entry represents a single Trino entry

type Option

type Option func(c *Config)

Used to manage varidic options

func SetDSN

func SetDSN(dsn string) Option

SetDSN sets the database connection string

Jump to

Keyboard shortcuts

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