atlassian

package
v0.5.12 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2024 License: Apache-2.0 Imports: 6 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckRequestIP

func CheckRequestIP(req *http.Request) bool

CheckRequestIP returns TRUE if the remote IP in an http.Request is from an Atlassian IP range

func GetIpRanges

func GetIpRanges() (ranges []string, err error)

GetIpRanges retrieves Atlassian IP ranges and returns the results

func Init

func Init()

Init retrieves the latest IP range list from Atlassian's service and enables developers to have control over when in their application lifecycle to perform network operations.

Types

type IpRangeItem

type IpRangeItem struct {
	Network   string   `json:"network"`
	MaskLen   int      `json:"mask_len"`
	Cidr      string   `json:"cidr"`
	Mask      string   `json:"mask"`
	Region    []string `json:"region"`
	Product   []string `json:"product"`
	Direction []string `json:"direction"`
}

type IpRangeResponse

type IpRangeResponse struct {
	CreationDate string        `json:"creationDate"`
	SyncToken    int           `json:"syncToken"`
	Items        []IpRangeItem `json:"items"`
}

Jump to

Keyboard shortcuts

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