Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EndpointInfo ¶
type EndpointInfo struct { TemplateURL string APIVersion string URLSegments []EndpointSegment }
EndpointInfo represents an ARM endpoint
func GetEndpointInfoFromURL ¶
func GetEndpointInfoFromURL(templateURL string, apiVersion string) (EndpointInfo, error)
GetEndpointInfoFromURL builds an EndpointInfo instance
func (*EndpointInfo) BuildURL ¶
func (ei *EndpointInfo) BuildURL(values map[string]string) (string, error)
BuildURL generates a URL based on the templateURL filling in placeholders with the values map
func (*EndpointInfo) Match ¶
func (ei *EndpointInfo) Match(url string) MatchResult
Match tests whether a URL matches the EndpointInfo (ignoring query string values)
type EndpointSegment ¶
type EndpointSegment struct { // holds a literal to match for fixed segments (e.g. /subscriptions/) Match string // holds the name of a templated segment (e.g. 'name' for /{name}/) Name string }
EndpointSegment reprsesents a segment of a template URL
type MatchResult ¶
type MatchResult struct { // indicates whether this was a match IsMatch bool // holds the values pulled from named segments of the URL Values map[string]string }
MatchResult holds information about an EndPointInfo match
Click to show internal directories.
Click to hide internal directories.