aws_ip

package module
v0.0.0-...-247b226 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2021 License: MIT Imports: 0 Imported by: 0

README

aws-ip

Test Go Reference

The package to get AWS IP address ranges.

SYNOPSIS

package main

import (
    "fmt"

    awsip "github.com/shmokmt/aws-ip"
)

func main() {
    prefixes := awsip.Query().Service("CODEBUILD").Select()
    for _, p := range prefixes {
        fmt.Println(p.IPPrefix)
        fmt.Println(p.Region)
        fmt.Println(p.Service)
        fmt.Println(p.NetworkBorderGroup)
    }
}
LICENSE

MIT

Documentation

Overview

The package to get AWS IP ranges.

Tha package to get AWS IP ranges.

Code generated by internal/gen/gen.go; DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IPRange

type IPRange struct {
	IPPrefix           string `json:"ip_prefix"`
	Region             string `json:"region"`
	Service            string `json:"service"`
	NetworkBorderGroup string `json:"network_border_group"`
}

IPRanges has various information related to `ip_prefix`.

type IPRanges

type IPRanges []*IPRange

IPRanges is a slice of IPRange.

type Querier

type Querier struct {
	Ranges IPRanges
}

Querier executes query.

func Query

func Query() *Querier

Query creates Querier.

func (*Querier) NetworkBorderGroup

func (q *Querier) NetworkBorderGroup(network string) *Querier

NetworkBorderGroup filters IPRanges by network's name.

func (*Querier) Region

func (q *Querier) Region(region string) *Querier

Region filters IPRanges by region's name.

func (*Querier) Select

func (q *Querier) Select() IPRanges

Select returns IPRanges.

func (*Querier) Service

func (q *Querier) Service(service string) *Querier

Service filters IPRanges by service's name.

Directories

Path Synopsis
cmd
internal
gen

Jump to

Keyboard shortcuts

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