id
int32
0
167k
repo
stringlengths
5
54
path
stringlengths
4
155
func_name
stringlengths
1
118
original_string
stringlengths
52
85.5k
language
stringclasses
1 value
code
stringlengths
52
85.5k
code_tokens
listlengths
21
1.41k
docstring
stringlengths
6
2.61k
docstring_tokens
listlengths
3
215
sha
stringlengths
40
40
url
stringlengths
85
252
132,300
sethvargo/go-fastly
fastly/service.go
ListServices
func (c *Client) ListServices(i *ListServicesInput) ([]*Service, error) { resp, err := c.Get("/service", nil) if err != nil { return nil, err } var s []*Service if err := decodeJSON(&s, resp.Body); err != nil { return nil, err } sort.Stable(servicesByName(s)) return s, nil }
go
func (c *Client) ListServices(i *ListServicesInput) ([]*Service, error) { resp, err := c.Get("/service", nil) if err != nil { return nil, err } var s []*Service if err := decodeJSON(&s, resp.Body); err != nil { return nil, err } sort.Stable(servicesByName(s)) return s, nil }
[ "func", "(", "c", "*", "Client", ")", "ListServices", "(", "i", "*", "ListServicesInput", ")", "(", "[", "]", "*", "Service", ",", "error", ")", "{", "resp", ",", "err", ":=", "c", ".", "Get", "(", "\"", "\"", ",", "nil", ")", "\n", "if", "err"...
// ListServices returns the full list of services for the current account.
[ "ListServices", "returns", "the", "full", "list", "of", "services", "for", "the", "current", "account", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/service.go#L58-L70
132,301
sethvargo/go-fastly
fastly/service.go
CreateService
func (c *Client) CreateService(i *CreateServiceInput) (*Service, error) { resp, err := c.PostForm("/service", i, nil) if err != nil { return nil, err } var s *Service if err := decodeJSON(&s, resp.Body); err != nil { return nil, err } return s, nil }
go
func (c *Client) CreateService(i *CreateServiceInput) (*Service, error) { resp, err := c.PostForm("/service", i, nil) if err != nil { return nil, err } var s *Service if err := decodeJSON(&s, resp.Body); err != nil { return nil, err } return s, nil }
[ "func", "(", "c", "*", "Client", ")", "CreateService", "(", "i", "*", "CreateServiceInput", ")", "(", "*", "Service", ",", "error", ")", "{", "resp", ",", "err", ":=", "c", ".", "PostForm", "(", "\"", "\"", ",", "i", ",", "nil", ")", "\n", "if", ...
// CreateService creates a new service with the given information.
[ "CreateService", "creates", "a", "new", "service", "with", "the", "given", "information", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/service.go#L79-L90
132,302
sethvargo/go-fastly
fastly/service.go
UpdateService
func (c *Client) UpdateService(i *UpdateServiceInput) (*Service, error) { if i.ID == "" { return nil, ErrMissingID } path := fmt.Sprintf("/service/%s", i.ID) resp, err := c.PutForm(path, i, nil) if err != nil { return nil, err } var s *Service if err := decodeJSON(&s, resp.Body); err != nil { return nil...
go
func (c *Client) UpdateService(i *UpdateServiceInput) (*Service, error) { if i.ID == "" { return nil, ErrMissingID } path := fmt.Sprintf("/service/%s", i.ID) resp, err := c.PutForm(path, i, nil) if err != nil { return nil, err } var s *Service if err := decodeJSON(&s, resp.Body); err != nil { return nil...
[ "func", "(", "c", "*", "Client", ")", "UpdateService", "(", "i", "*", "UpdateServiceInput", ")", "(", "*", "Service", ",", "error", ")", "{", "if", "i", ".", "ID", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingID", "\n", "}", "\n\n", "pat...
// UpdateService updates the service with the given input.
[ "UpdateService", "updates", "the", "service", "with", "the", "given", "input", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/service.go#L149-L165
132,303
sethvargo/go-fastly
fastly/service.go
DeleteService
func (c *Client) DeleteService(i *DeleteServiceInput) error { if i.ID == "" { return ErrMissingID } path := fmt.Sprintf("/service/%s", i.ID) resp, err := c.Delete(path, nil) if err != nil { return err } var r *statusResp if err := decodeJSON(&r, resp.Body); err != nil { return err } if !r.Ok() { ret...
go
func (c *Client) DeleteService(i *DeleteServiceInput) error { if i.ID == "" { return ErrMissingID } path := fmt.Sprintf("/service/%s", i.ID) resp, err := c.Delete(path, nil) if err != nil { return err } var r *statusResp if err := decodeJSON(&r, resp.Body); err != nil { return err } if !r.Ok() { ret...
[ "func", "(", "c", "*", "Client", ")", "DeleteService", "(", "i", "*", "DeleteServiceInput", ")", "error", "{", "if", "i", ".", "ID", "==", "\"", "\"", "{", "return", "ErrMissingID", "\n", "}", "\n\n", "path", ":=", "fmt", ".", "Sprintf", "(", "\"", ...
// DeleteService updates the service with the given input.
[ "DeleteService", "updates", "the", "service", "with", "the", "given", "input", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/service.go#L173-L192
132,304
sethvargo/go-fastly
fastly/service.go
ListServiceDomains
func (c *Client) ListServiceDomains(i *ListServiceDomainInput) (ServiceDomainsList, error) { if i.ID == "" { return nil, ErrMissingID } path := fmt.Sprintf("/service/%s/domain", i.ID) resp, err := c.Get(path, nil) if err != nil { return nil, err } var ds ServiceDomainsList if err := decodeJSON(&ds, resp.B...
go
func (c *Client) ListServiceDomains(i *ListServiceDomainInput) (ServiceDomainsList, error) { if i.ID == "" { return nil, ErrMissingID } path := fmt.Sprintf("/service/%s/domain", i.ID) resp, err := c.Get(path, nil) if err != nil { return nil, err } var ds ServiceDomainsList if err := decodeJSON(&ds, resp.B...
[ "func", "(", "c", "*", "Client", ")", "ListServiceDomains", "(", "i", "*", "ListServiceDomainInput", ")", "(", "ServiceDomainsList", ",", "error", ")", "{", "if", "i", ".", "ID", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingID", "\n", "}", "...
// ListServiceDomains lists all domains associated with a given service
[ "ListServiceDomains", "lists", "all", "domains", "associated", "with", "a", "given", "service" ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/service.go#L228-L245
132,305
sethvargo/go-fastly
fastly/vcl.go
ListVCLs
func (c *Client) ListVCLs(i *ListVCLsInput) ([]*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/vcl", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return nil, err } ...
go
func (c *Client) ListVCLs(i *ListVCLsInput) ([]*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/vcl", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return nil, err } ...
[ "func", "(", "c", "*", "Client", ")", "ListVCLs", "(", "i", "*", "ListVCLsInput", ")", "(", "[", "]", "*", "VCL", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\...
// ListVCLs returns the list of VCLs for the configuration version.
[ "ListVCLs", "returns", "the", "list", "of", "VCLs", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl.go#L38-L59
132,306
sethvargo/go-fastly
fastly/vcl.go
GetVCL
func (c *Client) GetVCL(i *GetVCLInput) (*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/vcl/%s", i.Service, i.Version, i.Name) resp, err :=...
go
func (c *Client) GetVCL(i *GetVCLInput) (*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/vcl/%s", i.Service, i.Version, i.Name) resp, err :=...
[ "func", "(", "c", "*", "Client", ")", "GetVCL", "(", "i", "*", "GetVCLInput", ")", "(", "*", "VCL", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", "i",...
// GetVCL gets the VCL configuration with the given parameters.
[ "GetVCL", "gets", "the", "VCL", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl.go#L73-L97
132,307
sethvargo/go-fastly
fastly/vcl.go
GetGeneratedVCL
func (c *Client) GetGeneratedVCL(i *GetGeneratedVCLInput) (*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/generated_vcl", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { ...
go
func (c *Client) GetGeneratedVCL(i *GetGeneratedVCLInput) (*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/generated_vcl", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { ...
[ "func", "(", "c", "*", "Client", ")", "GetGeneratedVCL", "(", "i", "*", "GetGeneratedVCLInput", ")", "(", "*", "VCL", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\...
// GetGeneratedVCL gets the VCL configuration with the given parameters.
[ "GetGeneratedVCL", "gets", "the", "VCL", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl.go#L108-L128
132,308
sethvargo/go-fastly
fastly/vcl.go
CreateVCL
func (c *Client) CreateVCL(i *CreateVCLInput) (*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/vcl", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != nil { return nil, ...
go
func (c *Client) CreateVCL(i *CreateVCLInput) (*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/vcl", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != nil { return nil, ...
[ "func", "(", "c", "*", "Client", ")", "CreateVCL", "(", "i", "*", "CreateVCLInput", ")", "(", "*", "VCL", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", ...
// CreateVCL creates a new Fastly VCL.
[ "CreateVCL", "creates", "a", "new", "Fastly", "VCL", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl.go#L143-L163
132,309
sethvargo/go-fastly
fastly/vcl.go
UpdateVCL
func (c *Client) UpdateVCL(i *UpdateVCLInput) (*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/vcl/%s", i.Service, i.Version, i.Name) resp, ...
go
func (c *Client) UpdateVCL(i *UpdateVCLInput) (*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/vcl/%s", i.Service, i.Version, i.Name) resp, ...
[ "func", "(", "c", "*", "Client", ")", "UpdateVCL", "(", "i", "*", "UpdateVCLInput", ")", "(", "*", "VCL", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", ...
// UpdateVCL creates a new Fastly VCL.
[ "UpdateVCL", "creates", "a", "new", "Fastly", "VCL", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl.go#L180-L204
132,310
sethvargo/go-fastly
fastly/vcl.go
ActivateVCL
func (c *Client) ActivateVCL(i *ActivateVCLInput) (*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/vcl/%s/main", i.Service, i.Version, i.Name...
go
func (c *Client) ActivateVCL(i *ActivateVCLInput) (*VCL, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/vcl/%s/main", i.Service, i.Version, i.Name...
[ "func", "(", "c", "*", "Client", ")", "ActivateVCL", "(", "i", "*", "ActivateVCLInput", ")", "(", "*", "VCL", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "i...
// ActivateVCL creates a new Fastly VCL.
[ "ActivateVCL", "creates", "a", "new", "Fastly", "VCL", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl.go#L218-L242
132,311
sethvargo/go-fastly
fastly/stats.go
GetStats
func (c *Client) GetStats(i *GetStatsInput) (*StatsResponse, error) { p := "/stats" if i.Service != "" { p = fmt.Sprintf("%s/service/%s", p, i.Service) } if i.Field != "" { p = fmt.Sprintf("%s/field/%s", p, i.Field) } r, err := c.Get(p, &RequestOptions{ Params: map[string]string{ "from": i.From, ...
go
func (c *Client) GetStats(i *GetStatsInput) (*StatsResponse, error) { p := "/stats" if i.Service != "" { p = fmt.Sprintf("%s/service/%s", p, i.Service) } if i.Field != "" { p = fmt.Sprintf("%s/field/%s", p, i.Field) } r, err := c.Get(p, &RequestOptions{ Params: map[string]string{ "from": i.From, ...
[ "func", "(", "c", "*", "Client", ")", "GetStats", "(", "i", "*", "GetStatsInput", ")", "(", "*", "StatsResponse", ",", "error", ")", "{", "p", ":=", "\"", "\"", "\n\n", "if", "i", ".", "Service", "!=", "\"", "\"", "{", "p", "=", "fmt", ".", "Sp...
// GetStats returns stats data based on GetStatsInput
[ "GetStats", "returns", "stats", "data", "based", "on", "GetStatsInput" ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/stats.go#L103-L133
132,312
sethvargo/go-fastly
fastly/stats.go
GetUsage
func (c *Client) GetUsage(i *GetUsageInput) (*UsageResponse, error) { r, err := c.Get("/stats/usage", &RequestOptions{ Params: map[string]string{ "from": i.From, "to": i.To, "by": i.By, "region": i.Region, }, }) if err != nil { return nil, err } var sr *UsageResponse if err := decodeJS...
go
func (c *Client) GetUsage(i *GetUsageInput) (*UsageResponse, error) { r, err := c.Get("/stats/usage", &RequestOptions{ Params: map[string]string{ "from": i.From, "to": i.To, "by": i.By, "region": i.Region, }, }) if err != nil { return nil, err } var sr *UsageResponse if err := decodeJS...
[ "func", "(", "c", "*", "Client", ")", "GetUsage", "(", "i", "*", "GetUsageInput", ")", "(", "*", "UsageResponse", ",", "error", ")", "{", "r", ",", "err", ":=", "c", ".", "Get", "(", "\"", "\"", ",", "&", "RequestOptions", "{", "Params", ":", "ma...
// GetUsage returns usage information aggregated across all Fastly services and grouped by region.
[ "GetUsage", "returns", "usage", "information", "aggregated", "across", "all", "Fastly", "services", "and", "grouped", "by", "region", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/stats.go#L170-L188
132,313
sethvargo/go-fastly
fastly/stats.go
GetRegions
func (c *Client) GetRegions() (*RegionsResponse, error) { r, err := c.Get("stats/regions", nil) if err != nil { return nil, err } var rr *RegionsResponse if err := decodeJSON(&rr, r.Body); err != nil { return nil, err } return rr, nil }
go
func (c *Client) GetRegions() (*RegionsResponse, error) { r, err := c.Get("stats/regions", nil) if err != nil { return nil, err } var rr *RegionsResponse if err := decodeJSON(&rr, r.Body); err != nil { return nil, err } return rr, nil }
[ "func", "(", "c", "*", "Client", ")", "GetRegions", "(", ")", "(", "*", "RegionsResponse", ",", "error", ")", "{", "r", ",", "err", ":=", "c", ".", "Get", "(", "\"", "\"", ",", "nil", ")", "\n", "if", "err", "!=", "nil", "{", "return", "nil", ...
// GetRegions returns a list of Fastly regions
[ "GetRegions", "returns", "a", "list", "of", "Fastly", "regions" ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/stats.go#L235-L247
132,314
sethvargo/go-fastly
fastly/splunk.go
ListSplunks
func (c *Client) ListSplunks(i *ListSplunksInput) ([]*Splunk, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/splunk", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { ...
go
func (c *Client) ListSplunks(i *ListSplunksInput) ([]*Splunk, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/splunk", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { ...
[ "func", "(", "c", "*", "Client", ")", "ListSplunks", "(", "i", "*", "ListSplunksInput", ")", "(", "[", "]", "*", "Splunk", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}...
// ListSplunks returns the list of splunks for the configuration version.
[ "ListSplunks", "returns", "the", "list", "of", "splunks", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/splunk.go#L46-L67
132,315
sethvargo/go-fastly
fastly/splunk.go
CreateSplunk
func (c *Client) CreateSplunk(i *CreateSplunkInput) (*Splunk, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/splunk", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != ...
go
func (c *Client) CreateSplunk(i *CreateSplunkInput) (*Splunk, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/splunk", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != ...
[ "func", "(", "c", "*", "Client", ")", "CreateSplunk", "(", "i", "*", "CreateSplunkInput", ")", "(", "*", "Splunk", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n",...
// CreateSplunk creates a new Fastly splunk.
[ "CreateSplunk", "creates", "a", "new", "Fastly", "splunk", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/splunk.go#L86-L106
132,316
sethvargo/go-fastly
fastly/splunk.go
GetSplunk
func (c *Client) GetSplunk(i *GetSplunkInput) (*Splunk, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/splunk/%s", i.Service, i.Version, i...
go
func (c *Client) GetSplunk(i *GetSplunkInput) (*Splunk, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/splunk/%s", i.Service, i.Version, i...
[ "func", "(", "c", "*", "Client", ")", "GetSplunk", "(", "i", "*", "GetSplunkInput", ")", "(", "*", "Splunk", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if...
// GetSplunk gets the splunk configuration with the given parameters.
[ "GetSplunk", "gets", "the", "splunk", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/splunk.go#L120-L144
132,317
sethvargo/go-fastly
fastly/splunk.go
UpdateSplunk
func (c *Client) UpdateSplunk(i *UpdateSplunkInput) (*Splunk, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/splunk/%s", i.Service, i.Vers...
go
func (c *Client) UpdateSplunk(i *UpdateSplunkInput) (*Splunk, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/splunk/%s", i.Service, i.Vers...
[ "func", "(", "c", "*", "Client", ")", "UpdateSplunk", "(", "i", "*", "UpdateSplunkInput", ")", "(", "*", "Splunk", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n",...
// UpdateSplunk updates a specific splunk.
[ "UpdateSplunk", "updates", "a", "specific", "splunk", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/splunk.go#L166-L190
132,318
sethvargo/go-fastly
fastly/health_check.go
ListHealthChecks
func (c *Client) ListHealthChecks(i *ListHealthChecksInput) ([]*HealthCheck, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/healthcheck", i.Service, i.Version) resp, err := c.Get(path, nil) if err...
go
func (c *Client) ListHealthChecks(i *ListHealthChecksInput) ([]*HealthCheck, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/healthcheck", i.Service, i.Version) resp, err := c.Get(path, nil) if err...
[ "func", "(", "c", "*", "Client", ")", "ListHealthChecks", "(", "i", "*", "ListHealthChecksInput", ")", "(", "[", "]", "*", "HealthCheck", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService...
// ListHealthChecks returns the list of health checks for the configuration // version.
[ "ListHealthChecks", "returns", "the", "list", "of", "health", "checks", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/health_check.go#L48-L69
132,319
sethvargo/go-fastly
fastly/health_check.go
CreateHealthCheck
func (c *Client) CreateHealthCheck(i *CreateHealthCheckInput) (*HealthCheck, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/healthcheck", i.Service, i.Version) resp, err := c.PostForm(path, i, nil)...
go
func (c *Client) CreateHealthCheck(i *CreateHealthCheckInput) (*HealthCheck, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/healthcheck", i.Service, i.Version) resp, err := c.PostForm(path, i, nil)...
[ "func", "(", "c", "*", "Client", ")", "CreateHealthCheck", "(", "i", "*", "CreateHealthCheckInput", ")", "(", "*", "HealthCheck", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", ...
// CreateHealthCheck creates a new Fastly health check.
[ "CreateHealthCheck", "creates", "a", "new", "Fastly", "health", "check", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/health_check.go#L93-L113
132,320
sethvargo/go-fastly
fastly/health_check.go
GetHealthCheck
func (c *Client) GetHealthCheck(i *GetHealthCheckInput) (*HealthCheck, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/healthcheck/%s", i.Service, ...
go
func (c *Client) GetHealthCheck(i *GetHealthCheckInput) (*HealthCheck, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/healthcheck/%s", i.Service, ...
[ "func", "(", "c", "*", "Client", ")", "GetHealthCheck", "(", "i", "*", "GetHealthCheckInput", ")", "(", "*", "HealthCheck", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", ...
// GetHealthCheck gets the health check configuration with the given parameters.
[ "GetHealthCheck", "gets", "the", "health", "check", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/health_check.go#L127-L151
132,321
sethvargo/go-fastly
fastly/health_check.go
UpdateHealthCheck
func (c *Client) UpdateHealthCheck(i *UpdateHealthCheckInput) (*HealthCheck, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/healthcheck/%s", i.Ser...
go
func (c *Client) UpdateHealthCheck(i *UpdateHealthCheckInput) (*HealthCheck, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/healthcheck/%s", i.Ser...
[ "func", "(", "c", "*", "Client", ")", "UpdateHealthCheck", "(", "i", "*", "UpdateHealthCheckInput", ")", "(", "*", "HealthCheck", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", ...
// UpdateHealthCheck updates a specific health check.
[ "UpdateHealthCheck", "updates", "a", "specific", "health", "check", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/health_check.go#L178-L202
132,322
sethvargo/go-fastly
fastly/condition.go
ListConditions
func (c *Client) ListConditions(i *ListConditionsInput) ([]*Condition, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/condition", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil ...
go
func (c *Client) ListConditions(i *ListConditionsInput) ([]*Condition, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/condition", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil ...
[ "func", "(", "c", "*", "Client", ")", "ListConditions", "(", "i", "*", "ListConditionsInput", ")", "(", "[", "]", "*", "Condition", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "...
// ListConditions returns the list of conditions for the configuration version.
[ "ListConditions", "returns", "the", "list", "of", "conditions", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/condition.go#L41-L62
132,323
sethvargo/go-fastly
fastly/condition.go
CreateCondition
func (c *Client) CreateCondition(i *CreateConditionInput) (*Condition, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/condition", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err...
go
func (c *Client) CreateCondition(i *CreateConditionInput) (*Condition, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/condition", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err...
[ "func", "(", "c", "*", "Client", ")", "CreateCondition", "(", "i", "*", "CreateConditionInput", ")", "(", "*", "Condition", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", ...
// CreateCondition creates a new Fastly condition.
[ "CreateCondition", "creates", "a", "new", "Fastly", "condition", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/condition.go#L78-L98
132,324
sethvargo/go-fastly
fastly/condition.go
GetCondition
func (c *Client) GetCondition(i *GetConditionInput) (*Condition, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/condition/%s", i.Service, i.Versio...
go
func (c *Client) GetCondition(i *GetConditionInput) (*Condition, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/condition/%s", i.Service, i.Versio...
[ "func", "(", "c", "*", "Client", ")", "GetCondition", "(", "i", "*", "GetConditionInput", ")", "(", "*", "Condition", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\...
// GetCondition gets the condition configuration with the given parameters.
[ "GetCondition", "gets", "the", "condition", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/condition.go#L112-L136
132,325
sethvargo/go-fastly
fastly/condition.go
UpdateCondition
func (c *Client) UpdateCondition(i *UpdateConditionInput) (*Condition, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/condition/%s", i.Service, i....
go
func (c *Client) UpdateCondition(i *UpdateConditionInput) (*Condition, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/condition/%s", i.Service, i....
[ "func", "(", "c", "*", "Client", ")", "UpdateCondition", "(", "i", "*", "UpdateConditionInput", ")", "(", "*", "Condition", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", ...
// UpdateCondition updates a specific condition.
[ "UpdateCondition", "updates", "a", "specific", "condition", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/condition.go#L156-L180
132,326
sethvargo/go-fastly
fastly/condition.go
DeleteCondition
func (c *Client) DeleteCondition(i *DeleteConditionInput) error { if i.Service == "" { return ErrMissingService } if i.Version == 0 { return ErrMissingVersion } if i.Name == "" { return ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/condition/%s", i.Service, i.Version, url.PathEscape(i.Nam...
go
func (c *Client) DeleteCondition(i *DeleteConditionInput) error { if i.Service == "" { return ErrMissingService } if i.Version == 0 { return ErrMissingVersion } if i.Name == "" { return ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/condition/%s", i.Service, i.Version, url.PathEscape(i.Nam...
[ "func", "(", "c", "*", "Client", ")", "DeleteCondition", "(", "i", "*", "DeleteConditionInput", ")", "error", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "ErrMissingService", "\n", "}", "\n\n", "if", "i", ".", "Version", "==", "0",...
// DeleteCondition deletes the given condition version.
[ "DeleteCondition", "deletes", "the", "given", "condition", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/condition.go#L194-L221
132,327
sethvargo/go-fastly
fastly/billing.go
GetBilling
func (c *Client) GetBilling(i *GetBillingInput) (*Billing, error) { if i.Year == 0 { return nil, ErrMissingYear } if i.Month == 0 { return nil, ErrMissingMonth } path := fmt.Sprintf("/billing/year/%d/month/%02d", i.Year, i.Month) resp, err := c.Get(path, nil) if err != nil { return nil, err } var b *B...
go
func (c *Client) GetBilling(i *GetBillingInput) (*Billing, error) { if i.Year == 0 { return nil, ErrMissingYear } if i.Month == 0 { return nil, ErrMissingMonth } path := fmt.Sprintf("/billing/year/%d/month/%02d", i.Year, i.Month) resp, err := c.Get(path, nil) if err != nil { return nil, err } var b *B...
[ "func", "(", "c", "*", "Client", ")", "GetBilling", "(", "i", "*", "GetBillingInput", ")", "(", "*", "Billing", ",", "error", ")", "{", "if", "i", ".", "Year", "==", "0", "{", "return", "nil", ",", "ErrMissingYear", "\n", "}", "\n\n", "if", "i", ...
// GetBilling returns the billing information for the current account.
[ "GetBilling", "returns", "the", "billing", "information", "for", "the", "current", "account", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/billing.go#L61-L81
132,328
sethvargo/go-fastly
fastly/vcl_snippets.go
CreateSnippet
func (c *Client) CreateSnippet(i *CreateSnippetInput) (*Snippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } if i.Dynamic == 0 && i.Content == "" { return nil, ErrMissingContent } pa...
go
func (c *Client) CreateSnippet(i *CreateSnippetInput) (*Snippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } if i.Dynamic == 0 && i.Content == "" { return nil, ErrMissingContent } pa...
[ "func", "(", "c", "*", "Client", ")", "CreateSnippet", "(", "i", "*", "CreateSnippetInput", ")", "(", "*", "Snippet", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\...
// CreateSnippet creates a new snippet or dynamic snippet on a unlocked version
[ "CreateSnippet", "creates", "a", "new", "snippet", "or", "dynamic", "snippet", "on", "a", "unlocked", "version" ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl_snippets.go#L99-L127
132,329
sethvargo/go-fastly
fastly/vcl_snippets.go
UpdateSnippet
func (c *Client) UpdateSnippet(i *UpdateSnippetInput) (*Snippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } if i.Dynamic == 0 && i.Content == "" { return nil, ErrMissingContent } pa...
go
func (c *Client) UpdateSnippet(i *UpdateSnippetInput) (*Snippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } if i.Dynamic == 0 && i.Content == "" { return nil, ErrMissingContent } pa...
[ "func", "(", "c", "*", "Client", ")", "UpdateSnippet", "(", "i", "*", "UpdateSnippetInput", ")", "(", "*", "Snippet", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\...
// UpdateSnippet updates a snippet on a unlocked version
[ "UpdateSnippet", "updates", "a", "snippet", "on", "a", "unlocked", "version" ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl_snippets.go#L156-L184
132,330
sethvargo/go-fastly
fastly/vcl_snippets.go
UpdateDynamicSnippet
func (c *Client) UpdateDynamicSnippet(i *UpdateDynamicSnippetInput) (*DynamicSnippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.ID == "" { return nil, ErrMissingID } path := fmt.Sprintf("/service/%s/snippet/%s", i.Service, i.ID) resp, err := c.PutForm(path, i, nil) if err != nil { ...
go
func (c *Client) UpdateDynamicSnippet(i *UpdateDynamicSnippetInput) (*DynamicSnippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.ID == "" { return nil, ErrMissingID } path := fmt.Sprintf("/service/%s/snippet/%s", i.Service, i.ID) resp, err := c.PutForm(path, i, nil) if err != nil { ...
[ "func", "(", "c", "*", "Client", ")", "UpdateDynamicSnippet", "(", "i", "*", "UpdateDynamicSnippetInput", ")", "(", "*", "DynamicSnippet", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", ...
// UpdateDynamicSnippet replaces the content of a Dynamic Snippet
[ "UpdateDynamicSnippet", "replaces", "the", "content", "of", "a", "Dynamic", "Snippet" ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl_snippets.go#L214-L234
132,331
sethvargo/go-fastly
fastly/vcl_snippets.go
ListSnippets
func (c *Client) ListSnippets(i *ListSnippetsInput) ([]*Snippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/snippet", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { retu...
go
func (c *Client) ListSnippets(i *ListSnippetsInput) ([]*Snippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/snippet", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { retu...
[ "func", "(", "c", "*", "Client", ")", "ListSnippets", "(", "i", "*", "ListSnippetsInput", ")", "(", "[", "]", "*", "Snippet", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", ...
// ListSnippets returns the list of Snippets for the configuration version. Content is not displayed for Dynmanic Snippets due to them being // versionless, use the GetDynamicSnippet function to show current content.
[ "ListSnippets", "returns", "the", "list", "of", "Snippets", "for", "the", "configuration", "version", ".", "Content", "is", "not", "displayed", "for", "Dynmanic", "Snippets", "due", "to", "them", "being", "versionless", "use", "the", "GetDynamicSnippet", "function...
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl_snippets.go#L297-L318
132,332
sethvargo/go-fastly
fastly/vcl_snippets.go
GetSnippet
func (c *Client) GetSnippet(i *GetSnippetInput) (*Snippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/snippet/%s", i.Service, i.Version, i.Nam...
go
func (c *Client) GetSnippet(i *GetSnippetInput) (*Snippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/snippet/%s", i.Service, i.Version, i.Nam...
[ "func", "(", "c", "*", "Client", ")", "GetSnippet", "(", "i", "*", "GetSnippetInput", ")", "(", "*", "Snippet", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", ...
// GetSnippet gets the Snippet configuration with the given parameters. Dynamic Snippets will not show content due to them // being versionless, use GetDynamicSnippet to see content.
[ "GetSnippet", "gets", "the", "Snippet", "configuration", "with", "the", "given", "parameters", ".", "Dynamic", "Snippets", "will", "not", "show", "content", "due", "to", "them", "being", "versionless", "use", "GetDynamicSnippet", "to", "see", "content", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl_snippets.go#L333-L357
132,333
sethvargo/go-fastly
fastly/vcl_snippets.go
GetDynamicSnippet
func (c *Client) GetDynamicSnippet(i *GetDynamicSnippetInput) (*DynamicSnippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.ID == "" { return nil, ErrMissingID } path := fmt.Sprintf("/service/%s/snippet/%s", i.Service, i.ID) resp, err := c.Get(path, nil) if err != nil { return nil,...
go
func (c *Client) GetDynamicSnippet(i *GetDynamicSnippetInput) (*DynamicSnippet, error) { if i.Service == "" { return nil, ErrMissingService } if i.ID == "" { return nil, ErrMissingID } path := fmt.Sprintf("/service/%s/snippet/%s", i.Service, i.ID) resp, err := c.Get(path, nil) if err != nil { return nil,...
[ "func", "(", "c", "*", "Client", ")", "GetDynamicSnippet", "(", "i", "*", "GetDynamicSnippetInput", ")", "(", "*", "DynamicSnippet", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n"...
// GetDynamicSnippet gets the Snippet configuration with the given parameters. This will show the current content // associated with a Dynamic Snippet.
[ "GetDynamicSnippet", "gets", "the", "Snippet", "configuration", "with", "the", "given", "parameters", ".", "This", "will", "show", "the", "current", "content", "associated", "with", "a", "Dynamic", "Snippet", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/vcl_snippets.go#L370-L390
132,334
sethvargo/go-fastly
fastly/cache_setting.go
ListCacheSettings
func (c *Client) ListCacheSettings(i *ListCacheSettingsInput) ([]*CacheSetting, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/cache_settings", i.Service, i.Version) resp, err := c.Get(path, nil) ...
go
func (c *Client) ListCacheSettings(i *ListCacheSettingsInput) ([]*CacheSetting, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/cache_settings", i.Service, i.Version) resp, err := c.Get(path, nil) ...
[ "func", "(", "c", "*", "Client", ")", "ListCacheSettings", "(", "i", "*", "ListCacheSettingsInput", ")", "(", "[", "]", "*", "CacheSetting", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingServ...
// ListCacheSettings returns the list of cache settings for the configuration // version.
[ "ListCacheSettings", "returns", "the", "list", "of", "cache", "settings", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/cache_setting.go#L55-L76
132,335
sethvargo/go-fastly
fastly/cache_setting.go
CreateCacheSetting
func (c *Client) CreateCacheSetting(i *CreateCacheSettingInput) (*CacheSetting, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/cache_settings", i.Service, i.Version) resp, err := c.PostForm(path, i...
go
func (c *Client) CreateCacheSetting(i *CreateCacheSettingInput) (*CacheSetting, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/cache_settings", i.Service, i.Version) resp, err := c.PostForm(path, i...
[ "func", "(", "c", "*", "Client", ")", "CreateCacheSetting", "(", "i", "*", "CreateCacheSettingInput", ")", "(", "*", "CacheSetting", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n"...
// CreateCacheSetting creates a new Fastly cache setting.
[ "CreateCacheSetting", "creates", "a", "new", "Fastly", "cache", "setting", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/cache_setting.go#L93-L113
132,336
sethvargo/go-fastly
fastly/cache_setting.go
GetCacheSetting
func (c *Client) GetCacheSetting(i *GetCacheSettingInput) (*CacheSetting, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/cache_settings/%s", i.Ser...
go
func (c *Client) GetCacheSetting(i *GetCacheSettingInput) (*CacheSetting, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/cache_settings/%s", i.Ser...
[ "func", "(", "c", "*", "Client", ")", "GetCacheSetting", "(", "i", "*", "GetCacheSettingInput", ")", "(", "*", "CacheSetting", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}...
// GetCacheSetting gets the cache setting configuration with the given // parameters.
[ "GetCacheSetting", "gets", "the", "cache", "setting", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/cache_setting.go#L128-L152
132,337
sethvargo/go-fastly
fastly/cache_setting.go
UpdateCacheSetting
func (c *Client) UpdateCacheSetting(i *UpdateCacheSettingInput) (*CacheSetting, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/cache_settings/%s",...
go
func (c *Client) UpdateCacheSetting(i *UpdateCacheSettingInput) (*CacheSetting, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/cache_settings/%s",...
[ "func", "(", "c", "*", "Client", ")", "UpdateCacheSetting", "(", "i", "*", "UpdateCacheSettingInput", ")", "(", "*", "CacheSetting", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n"...
// UpdateCacheSetting updates a specific cache setting.
[ "UpdateCacheSetting", "updates", "a", "specific", "cache", "setting", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/cache_setting.go#L172-L196
132,338
sethvargo/go-fastly
fastly/blobstorage.go
ListBlobStorages
func (c *Client) ListBlobStorages(i *ListBlobStoragesInput) ([]*BlobStorage, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/azureblob", i.Service, i.Version) resp, err := c.Get(path, nil) ...
go
func (c *Client) ListBlobStorages(i *ListBlobStoragesInput) ([]*BlobStorage, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/azureblob", i.Service, i.Version) resp, err := c.Get(path, nil) ...
[ "func", "(", "c", "*", "Client", ")", "ListBlobStorages", "(", "i", "*", "ListBlobStoragesInput", ")", "(", "[", "]", "*", "BlobStorage", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService...
// ListBlobStorages returns the list of blob storages for the configuration version.
[ "ListBlobStorages", "returns", "the", "list", "of", "blob", "storages", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/blobstorage.go#L53-L74
132,339
sethvargo/go-fastly
fastly/blobstorage.go
CreateBlobStorage
func (c *Client) CreateBlobStorage(i *CreateBlobStorageInput) (*BlobStorage, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/azureblob", i.Service, i.Version) resp, err := c.PostForm(path, i...
go
func (c *Client) CreateBlobStorage(i *CreateBlobStorageInput) (*BlobStorage, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/azureblob", i.Service, i.Version) resp, err := c.PostForm(path, i...
[ "func", "(", "c", "*", "Client", ")", "CreateBlobStorage", "(", "i", "*", "CreateBlobStorageInput", ")", "(", "*", "BlobStorage", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", ...
// CreateBlobStorage creates a new Fastly blob storage.
[ "CreateBlobStorage", "creates", "a", "new", "Fastly", "blob", "storage", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/blobstorage.go#L100-L120
132,340
sethvargo/go-fastly
fastly/blobstorage.go
GetBlobStorage
func (c *Client) GetBlobStorage(i *GetBlobStorageInput) (*BlobStorage, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/azureblob/%s", i.Ser...
go
func (c *Client) GetBlobStorage(i *GetBlobStorageInput) (*BlobStorage, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/azureblob/%s", i.Ser...
[ "func", "(", "c", "*", "Client", ")", "GetBlobStorage", "(", "i", "*", "GetBlobStorageInput", ")", "(", "*", "BlobStorage", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", ...
// GetBlobStorage gets the blob storage configuration with the given parameters.
[ "GetBlobStorage", "gets", "the", "blob", "storage", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/blobstorage.go#L134-L158
132,341
sethvargo/go-fastly
fastly/blobstorage.go
UpdateBlobStorage
func (c *Client) UpdateBlobStorage(i *UpdateBlobStorageInput) (*BlobStorage, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/azureblob/%s",...
go
func (c *Client) UpdateBlobStorage(i *UpdateBlobStorageInput) (*BlobStorage, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/azureblob/%s",...
[ "func", "(", "c", "*", "Client", ")", "UpdateBlobStorage", "(", "i", "*", "UpdateBlobStorageInput", ")", "(", "*", "BlobStorage", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", ...
// UpdateBlobStorage updates a specific blob storage.
[ "UpdateBlobStorage", "updates", "a", "specific", "blob", "storage", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/blobstorage.go#L187-L211
132,342
sethvargo/go-fastly
fastly/papertrail.go
ListPapertrails
func (c *Client) ListPapertrails(i *ListPapertrailsInput) ([]*Papertrail, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/papertrail", i.Service, i.Version) resp, err := c.Get(path, nil) if...
go
func (c *Client) ListPapertrails(i *ListPapertrailsInput) ([]*Papertrail, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/papertrail", i.Service, i.Version) resp, err := c.Get(path, nil) if...
[ "func", "(", "c", "*", "Client", ")", "ListPapertrails", "(", "i", "*", "ListPapertrailsInput", ")", "(", "[", "]", "*", "Papertrail", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", ...
// ListPapertrails returns the list of papertrails for the configuration version.
[ "ListPapertrails", "returns", "the", "list", "of", "papertrails", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/papertrail.go#L45-L66
132,343
sethvargo/go-fastly
fastly/papertrail.go
CreatePapertrail
func (c *Client) CreatePapertrail(i *CreatePapertrailInput) (*Papertrail, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/papertrail", i.Service, i.Version) resp, err := c.PostForm(path, i, ...
go
func (c *Client) CreatePapertrail(i *CreatePapertrailInput) (*Papertrail, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/papertrail", i.Service, i.Version) resp, err := c.PostForm(path, i, ...
[ "func", "(", "c", "*", "Client", ")", "CreatePapertrail", "(", "i", "*", "CreatePapertrailInput", ")", "(", "*", "Papertrail", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}...
// CreatePapertrail creates a new Fastly papertrail.
[ "CreatePapertrail", "creates", "a", "new", "Fastly", "papertrail", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/papertrail.go#L87-L107
132,344
sethvargo/go-fastly
fastly/papertrail.go
GetPapertrail
func (c *Client) GetPapertrail(i *GetPapertrailInput) (*Papertrail, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/papertrail/%s", i.Servi...
go
func (c *Client) GetPapertrail(i *GetPapertrailInput) (*Papertrail, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/papertrail/%s", i.Servi...
[ "func", "(", "c", "*", "Client", ")", "GetPapertrail", "(", "i", "*", "GetPapertrailInput", ")", "(", "*", "Papertrail", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "...
// GetPapertrail gets the papertrail configuration with the given parameters.
[ "GetPapertrail", "gets", "the", "papertrail", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/papertrail.go#L121-L145
132,345
sethvargo/go-fastly
fastly/papertrail.go
UpdatePapertrail
func (c *Client) UpdatePapertrail(i *UpdatePapertrailInput) (*Papertrail, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/papertrail/%s", i...
go
func (c *Client) UpdatePapertrail(i *UpdatePapertrailInput) (*Papertrail, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/papertrail/%s", i...
[ "func", "(", "c", "*", "Client", ")", "UpdatePapertrail", "(", "i", "*", "UpdatePapertrailInput", ")", "(", "*", "Papertrail", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}...
// UpdatePapertrail updates a specific papertrail.
[ "UpdatePapertrail", "updates", "a", "specific", "papertrail", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/papertrail.go#L169-L193
132,346
sethvargo/go-fastly
fastly/version.go
ListVersions
func (c *Client) ListVersions(i *ListVersionsInput) ([]*Version, error) { if i.Service == "" { return nil, ErrMissingService } path := fmt.Sprintf("/service/%s/version", i.Service) resp, err := c.Get(path, nil) if err != nil { return nil, err } var e []*Version if err := decodeJSON(&e, resp.Body); err != ...
go
func (c *Client) ListVersions(i *ListVersionsInput) ([]*Version, error) { if i.Service == "" { return nil, ErrMissingService } path := fmt.Sprintf("/service/%s/version", i.Service) resp, err := c.Get(path, nil) if err != nil { return nil, err } var e []*Version if err := decodeJSON(&e, resp.Body); err != ...
[ "func", "(", "c", "*", "Client", ")", "ListVersions", "(", "i", "*", "ListVersionsInput", ")", "(", "[", "]", "*", "Version", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", ...
// ListVersions returns the full list of all versions of the given service.
[ "ListVersions", "returns", "the", "full", "list", "of", "all", "versions", "of", "the", "given", "service", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/version.go#L38-L56
132,347
sethvargo/go-fastly
fastly/version.go
GetVersion
func (c *Client) GetVersion(i *GetVersionInput) (*Version, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return nil, err }...
go
func (c *Client) GetVersion(i *GetVersionInput) (*Version, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return nil, err }...
[ "func", "(", "c", "*", "Client", ")", "GetVersion", "(", "i", "*", "GetVersionInput", ")", "(", "*", "Version", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", ...
// GetVersion fetches a version with the given information.
[ "GetVersion", "fetches", "a", "version", "with", "the", "given", "information", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/version.go#L123-L143
132,348
sethvargo/go-fastly
fastly/version.go
UpdateVersion
func (c *Client) UpdateVersion(i *UpdateVersionInput) (*Version, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d", i.Service, i.Version) resp, err := c.PutForm(path, i, nil) if err != nil { retur...
go
func (c *Client) UpdateVersion(i *UpdateVersionInput) (*Version, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d", i.Service, i.Version) resp, err := c.PutForm(path, i, nil) if err != nil { retur...
[ "func", "(", "c", "*", "Client", ")", "UpdateVersion", "(", "i", "*", "UpdateVersionInput", ")", "(", "*", "Version", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\...
// UpdateVersion updates the given version
[ "UpdateVersion", "updates", "the", "given", "version" ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/version.go#L157-L177
132,349
sethvargo/go-fastly
fastly/version.go
ValidateVersion
func (c *Client) ValidateVersion(i *ValidateVersionInput) (bool, string, error) { var msg string if i.Service == "" { return false, msg, ErrMissingService } if i.Version == 0 { return false, msg, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/validate", i.Service, i.Version) resp, err := ...
go
func (c *Client) ValidateVersion(i *ValidateVersionInput) (bool, string, error) { var msg string if i.Service == "" { return false, msg, ErrMissingService } if i.Version == 0 { return false, msg, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/validate", i.Service, i.Version) resp, err := ...
[ "func", "(", "c", "*", "Client", ")", "ValidateVersion", "(", "i", "*", "ValidateVersionInput", ")", "(", "bool", ",", "string", ",", "error", ")", "{", "var", "msg", "string", "\n\n", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "fals...
// ValidateVersion validates if the given version is okay.
[ "ValidateVersion", "validates", "if", "the", "given", "version", "is", "okay", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/version.go#L283-L307
132,350
sethvargo/go-fastly
fastly/version.go
LockVersion
func (c *Client) LockVersion(i *LockVersionInput) (*Version, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/lock", i.Service, i.Version) resp, err := c.Put(path, nil) if err != nil { return nil,...
go
func (c *Client) LockVersion(i *LockVersionInput) (*Version, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/lock", i.Service, i.Version) resp, err := c.Put(path, nil) if err != nil { return nil,...
[ "func", "(", "c", "*", "Client", ")", "LockVersion", "(", "i", "*", "LockVersionInput", ")", "(", "*", "Version", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", ...
// LockVersion locks the specified version.
[ "LockVersion", "locks", "the", "specified", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/version.go#L318-L338
132,351
sethvargo/go-fastly
fastly/purge.go
Purge
func (c *Client) Purge(i *PurgeInput) (*Purge, error) { if i.URL == "" { return nil, ErrMissingURL } req, err := c.RawRequest("PURGE", i.URL, nil) if err != nil { return nil, err } if i.Soft { req.Header.Set("Fastly-Soft-Purge", "1") } resp, err := checkResp(c.HTTPClient.Do(req)) if err != nil { ret...
go
func (c *Client) Purge(i *PurgeInput) (*Purge, error) { if i.URL == "" { return nil, ErrMissingURL } req, err := c.RawRequest("PURGE", i.URL, nil) if err != nil { return nil, err } if i.Soft { req.Header.Set("Fastly-Soft-Purge", "1") } resp, err := checkResp(c.HTTPClient.Do(req)) if err != nil { ret...
[ "func", "(", "c", "*", "Client", ")", "Purge", "(", "i", "*", "PurgeInput", ")", "(", "*", "Purge", ",", "error", ")", "{", "if", "i", ".", "URL", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingURL", "\n", "}", "\n\n", "req", ",", "err...
// Purge instantly purges an individual URL.
[ "Purge", "instantly", "purges", "an", "individual", "URL", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/purge.go#L24-L48
132,352
sethvargo/go-fastly
fastly/purge.go
PurgeAll
func (c *Client) PurgeAll(i *PurgeAllInput) (*Purge, error) { if i.Service == "" { return nil, ErrMissingService } path := fmt.Sprintf("/service/%s/purge_all", i.Service) req, err := c.RawRequest("POST", path, nil) if err != nil { return nil, err } if i.Soft { req.Header.Set("Fastly-Soft-Purge", "1") } ...
go
func (c *Client) PurgeAll(i *PurgeAllInput) (*Purge, error) { if i.Service == "" { return nil, ErrMissingService } path := fmt.Sprintf("/service/%s/purge_all", i.Service) req, err := c.RawRequest("POST", path, nil) if err != nil { return nil, err } if i.Soft { req.Header.Set("Fastly-Soft-Purge", "1") } ...
[ "func", "(", "c", "*", "Client", ")", "PurgeAll", "(", "i", "*", "PurgeAllInput", ")", "(", "*", "Purge", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "path"...
// PurgeAll instantly purges everything from a service.
[ "PurgeAll", "instantly", "purges", "everything", "from", "a", "service", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/purge.go#L104-L130
132,353
sethvargo/go-fastly
fastly/ftp.go
ListFTPs
func (c *Client) ListFTPs(i *ListFTPsInput) ([]*FTP, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/ftp", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return nil, ...
go
func (c *Client) ListFTPs(i *ListFTPsInput) ([]*FTP, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/ftp", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return nil, ...
[ "func", "(", "c", "*", "Client", ")", "ListFTPs", "(", "i", "*", "ListFTPsInput", ")", "(", "[", "]", "*", "FTP", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\...
// ListFTPs returns the list of ftps for the configuration version.
[ "ListFTPs", "returns", "the", "list", "of", "ftps", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/ftp.go#L51-L72
132,354
sethvargo/go-fastly
fastly/ftp.go
CreateFTP
func (c *Client) CreateFTP(i *CreateFTPInput) (*FTP, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/ftp", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != nil { retu...
go
func (c *Client) CreateFTP(i *CreateFTPInput) (*FTP, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/ftp", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != nil { retu...
[ "func", "(", "c", "*", "Client", ")", "CreateFTP", "(", "i", "*", "CreateFTPInput", ")", "(", "*", "FTP", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", ...
// CreateFTP creates a new Fastly FTP.
[ "CreateFTP", "creates", "a", "new", "Fastly", "FTP", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/ftp.go#L96-L116
132,355
sethvargo/go-fastly
fastly/ftp.go
GetFTP
func (c *Client) GetFTP(i *GetFTPInput) (*FTP, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/ftp/%s", i.Service, i.Version, i.Name) resp...
go
func (c *Client) GetFTP(i *GetFTPInput) (*FTP, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/ftp/%s", i.Service, i.Version, i.Name) resp...
[ "func", "(", "c", "*", "Client", ")", "GetFTP", "(", "i", "*", "GetFTPInput", ")", "(", "*", "FTP", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", "i",...
// GetFTP gets the FTP configuration with the given parameters.
[ "GetFTP", "gets", "the", "FTP", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/ftp.go#L130-L154
132,356
sethvargo/go-fastly
fastly/ftp.go
UpdateFTP
func (c *Client) UpdateFTP(i *UpdateFTPInput) (*FTP, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/ftp/%s", i.Service, i.Version, i.Name)...
go
func (c *Client) UpdateFTP(i *UpdateFTPInput) (*FTP, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/ftp/%s", i.Service, i.Version, i.Name)...
[ "func", "(", "c", "*", "Client", ")", "UpdateFTP", "(", "i", "*", "UpdateFTPInput", ")", "(", "*", "FTP", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", ...
// UpdateFTP updates a specific FTP.
[ "UpdateFTP", "updates", "a", "specific", "FTP", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/ftp.go#L181-L205
132,357
sethvargo/go-fastly
fastly/gcs.go
ListGCSs
func (c *Client) ListGCSs(i *ListGCSsInput) ([]*GCS, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/gcs", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return nil, ...
go
func (c *Client) ListGCSs(i *ListGCSsInput) ([]*GCS, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/gcs", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return nil, ...
[ "func", "(", "c", "*", "Client", ")", "ListGCSs", "(", "i", "*", "ListGCSsInput", ")", "(", "[", "]", "*", "GCS", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\...
// ListGCSs returns the list of gcses for the configuration version.
[ "ListGCSs", "returns", "the", "list", "of", "gcses", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/gcs.go#L47-L68
132,358
sethvargo/go-fastly
fastly/gcs.go
CreateGCS
func (c *Client) CreateGCS(i *CreateGCSInput) (*GCS, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/gcs", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != nil { retu...
go
func (c *Client) CreateGCS(i *CreateGCSInput) (*GCS, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/gcs", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != nil { retu...
[ "func", "(", "c", "*", "Client", ")", "CreateGCS", "(", "i", "*", "CreateGCSInput", ")", "(", "*", "GCS", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", ...
// CreateGCS creates a new Fastly GCS.
[ "CreateGCS", "creates", "a", "new", "Fastly", "GCS", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/gcs.go#L92-L112
132,359
sethvargo/go-fastly
fastly/gcs.go
GetGCS
func (c *Client) GetGCS(i *GetGCSInput) (*GCS, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/gcs/%s", i.Service, i.Version, i.Name) resp...
go
func (c *Client) GetGCS(i *GetGCSInput) (*GCS, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/gcs/%s", i.Service, i.Version, i.Name) resp...
[ "func", "(", "c", "*", "Client", ")", "GetGCS", "(", "i", "*", "GetGCSInput", ")", "(", "*", "GCS", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", "i",...
// GetGCS gets the GCS configuration with the given parameters.
[ "GetGCS", "gets", "the", "GCS", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/gcs.go#L126-L150
132,360
sethvargo/go-fastly
fastly/gcs.go
UpdateGCS
func (c *Client) UpdateGCS(i *UpdateGCSInput) (*GCS, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/gcs/%s", i.Service, i.Version, i.Name)...
go
func (c *Client) UpdateGCS(i *UpdateGCSInput) (*GCS, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/gcs/%s", i.Service, i.Version, i.Name)...
[ "func", "(", "c", "*", "Client", ")", "UpdateGCS", "(", "i", "*", "UpdateGCSInput", ")", "(", "*", "GCS", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", ...
// UpdateGCS updates a specific GCS.
[ "UpdateGCS", "updates", "a", "specific", "GCS", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/gcs.go#L176-L200
132,361
sethvargo/go-fastly
fastly/diff.go
GetDiff
func (c *Client) GetDiff(i *GetDiffInput) (*Diff, error) { if i.Service == "" { return nil, ErrMissingService } if i.From == 0 { return nil, ErrMissingFrom } if i.To == 0 { return nil, ErrMissingTo } path := fmt.Sprintf("service/%s/diff/from/%d/to/%d", i.Service, i.From, i.To) resp, err := c.Get(path, ...
go
func (c *Client) GetDiff(i *GetDiffInput) (*Diff, error) { if i.Service == "" { return nil, ErrMissingService } if i.From == 0 { return nil, ErrMissingFrom } if i.To == 0 { return nil, ErrMissingTo } path := fmt.Sprintf("service/%s/diff/from/%d/to/%d", i.Service, i.From, i.To) resp, err := c.Get(path, ...
[ "func", "(", "c", "*", "Client", ")", "GetDiff", "(", "i", "*", "GetDiffInput", ")", "(", "*", "Diff", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", "...
// GetDiff returns the diff of the given versions.
[ "GetDiff", "returns", "the", "diff", "of", "the", "given", "versions", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/diff.go#L33-L57
132,362
sethvargo/go-fastly
fastly/domain.go
ListDomains
func (c *Client) ListDomains(i *ListDomainsInput) ([]*Domain, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/domain", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return n...
go
func (c *Client) ListDomains(i *ListDomainsInput) ([]*Domain, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/domain", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return n...
[ "func", "(", "c", "*", "Client", ")", "ListDomains", "(", "i", "*", "ListDomainsInput", ")", "(", "[", "]", "*", "Domain", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}...
// ListDomains returns the list of domains for this Service.
[ "ListDomains", "returns", "the", "list", "of", "domains", "for", "this", "Service", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/domain.go#L36-L57
132,363
sethvargo/go-fastly
fastly/domain.go
CreateDomain
func (c *Client) CreateDomain(i *CreateDomainInput) (*Domain, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/domain", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != nil { ...
go
func (c *Client) CreateDomain(i *CreateDomainInput) (*Domain, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/domain", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != nil { ...
[ "func", "(", "c", "*", "Client", ")", "CreateDomain", "(", "i", "*", "CreateDomainInput", ")", "(", "*", "Domain", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n",...
// CreateDomain creates a new domain with the given information.
[ "CreateDomain", "creates", "a", "new", "domain", "with", "the", "given", "information", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/domain.go#L74-L94
132,364
sethvargo/go-fastly
fastly/domain.go
GetDomain
func (c *Client) GetDomain(i *GetDomainInput) (*Domain, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/domain/%s", i.Service, i.Version, i.Name) ...
go
func (c *Client) GetDomain(i *GetDomainInput) (*Domain, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/domain/%s", i.Service, i.Version, i.Name) ...
[ "func", "(", "c", "*", "Client", ")", "GetDomain", "(", "i", "*", "GetDomainInput", ")", "(", "*", "Domain", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if...
// GetDomain retrieves information about the given domain name.
[ "GetDomain", "retrieves", "information", "about", "the", "given", "domain", "name", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/domain.go#L108-L132
132,365
sethvargo/go-fastly
fastly/domain.go
UpdateDomain
func (c *Client) UpdateDomain(i *UpdateDomainInput) (*Domain, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/domain/%s", i.Service, i.Version, i.N...
go
func (c *Client) UpdateDomain(i *UpdateDomainInput) (*Domain, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/domain/%s", i.Service, i.Version, i.N...
[ "func", "(", "c", "*", "Client", ")", "UpdateDomain", "(", "i", "*", "UpdateDomainInput", ")", "(", "*", "Domain", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n",...
// UpdateDomain updates a single domain for the current service. The only allowed // parameters are `Name` and `Comment`.
[ "UpdateDomain", "updates", "a", "single", "domain", "for", "the", "current", "service", ".", "The", "only", "allowed", "parameters", "are", "Name", "and", "Comment", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/domain.go#L153-L177
132,366
sethvargo/go-fastly
fastly/domain.go
DeleteDomain
func (c *Client) DeleteDomain(i *DeleteDomainInput) error { if i.Service == "" { return ErrMissingService } if i.Version == 0 { return ErrMissingVersion } if i.Name == "" { return ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/domain/%s", i.Service, i.Version, i.Name) _, err := c.Delete(p...
go
func (c *Client) DeleteDomain(i *DeleteDomainInput) error { if i.Service == "" { return ErrMissingService } if i.Version == 0 { return ErrMissingVersion } if i.Name == "" { return ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/domain/%s", i.Service, i.Version, i.Name) _, err := c.Delete(p...
[ "func", "(", "c", "*", "Client", ")", "DeleteDomain", "(", "i", "*", "DeleteDomainInput", ")", "error", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "ErrMissingService", "\n", "}", "\n\n", "if", "i", ".", "Version", "==", "0", "{"...
// DeleteDomain removes a single domain by the given name.
[ "DeleteDomain", "removes", "a", "single", "domain", "by", "the", "given", "name", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/domain.go#L191-L210
132,367
sethvargo/go-fastly
fastly/errors.go
NewHTTPError
func NewHTTPError(resp *http.Response) *HTTPError { var e HTTPError e.StatusCode = resp.StatusCode if resp.Body == nil { return &e } // If this is a jsonapi response, decode it accordingly if resp.Header.Get("Content-Type") == jsonapi.MediaType { if err := decodeJSON(&e, resp.Body); err != nil { panic(er...
go
func NewHTTPError(resp *http.Response) *HTTPError { var e HTTPError e.StatusCode = resp.StatusCode if resp.Body == nil { return &e } // If this is a jsonapi response, decode it accordingly if resp.Header.Get("Content-Type") == jsonapi.MediaType { if err := decodeJSON(&e, resp.Body); err != nil { panic(er...
[ "func", "NewHTTPError", "(", "resp", "*", "http", ".", "Response", ")", "*", "HTTPError", "{", "var", "e", "HTTPError", "\n", "e", ".", "StatusCode", "=", "resp", ".", "StatusCode", "\n\n", "if", "resp", ".", "Body", "==", "nil", "{", "return", "&", ...
// NewHTTPError creates a new HTTP error from the given code.
[ "NewHTTPError", "creates", "a", "new", "HTTP", "error", "from", "the", "given", "code", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/errors.go#L167-L192
132,368
sethvargo/go-fastly
fastly/errors.go
Error
func (e *HTTPError) Error() string { var b bytes.Buffer fmt.Fprintf(&b, "%d - %s:", e.StatusCode, http.StatusText(e.StatusCode)) for _, e := range e.Errors { fmt.Fprintf(&b, "\n") if e.ID != "" { fmt.Fprintf(&b, "\n ID: %s", e.ID) } if e.Title != "" { fmt.Fprintf(&b, "\n Title: %s", e.Ti...
go
func (e *HTTPError) Error() string { var b bytes.Buffer fmt.Fprintf(&b, "%d - %s:", e.StatusCode, http.StatusText(e.StatusCode)) for _, e := range e.Errors { fmt.Fprintf(&b, "\n") if e.ID != "" { fmt.Fprintf(&b, "\n ID: %s", e.ID) } if e.Title != "" { fmt.Fprintf(&b, "\n Title: %s", e.Ti...
[ "func", "(", "e", "*", "HTTPError", ")", "Error", "(", ")", "string", "{", "var", "b", "bytes", ".", "Buffer", "\n\n", "fmt", ".", "Fprintf", "(", "&", "b", ",", "\"", "\"", ",", "e", ".", "StatusCode", ",", "http", ".", "StatusText", "(", "e", ...
// Error implements the error interface and returns the string representing the // error text that includes the status code and the corresponding status text.
[ "Error", "implements", "the", "error", "interface", "and", "returns", "the", "string", "representing", "the", "error", "text", "that", "includes", "the", "status", "code", "and", "the", "corresponding", "status", "text", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/errors.go#L196-L226
132,369
sethvargo/go-fastly
fastly/event_logs.go
GetAPIEvents
func (c *Client) GetAPIEvents(i *GetAPIEventsFilterInput) (GetAPIEventsResponse, error) { eventsResponse := GetAPIEventsResponse{ Events: []*Event{}, Links: EventsPaginationInfo{}, } path := fmt.Sprintf("/events") filters := &RequestOptions{Params: i.formatEventFilters()} resp, err := c.Get(path, filters) ...
go
func (c *Client) GetAPIEvents(i *GetAPIEventsFilterInput) (GetAPIEventsResponse, error) { eventsResponse := GetAPIEventsResponse{ Events: []*Event{}, Links: EventsPaginationInfo{}, } path := fmt.Sprintf("/events") filters := &RequestOptions{Params: i.formatEventFilters()} resp, err := c.Get(path, filters) ...
[ "func", "(", "c", "*", "Client", ")", "GetAPIEvents", "(", "i", "*", "GetAPIEventsFilterInput", ")", "(", "GetAPIEventsResponse", ",", "error", ")", "{", "eventsResponse", ":=", "GetAPIEventsResponse", "{", "Events", ":", "[", "]", "*", "Event", "{", "}", ...
// GetAPIEvents lists all the events for a particular customer
[ "GetAPIEvents", "lists", "all", "the", "events", "for", "a", "particular", "customer" ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/event_logs.go#L72-L94
132,370
sethvargo/go-fastly
fastly/event_logs.go
GetAPIEvent
func (c *Client) GetAPIEvent(i *GetAPIEventInput) (*Event, error) { if i.EventID == "" { return nil, ErrMissingEventID } path := fmt.Sprintf("/events/%s", i.EventID) resp, err := c.Get(path, nil) if err != nil { return nil, err } var event Event if err := jsonapi.UnmarshalPayload(resp.Body, &event); err !...
go
func (c *Client) GetAPIEvent(i *GetAPIEventInput) (*Event, error) { if i.EventID == "" { return nil, ErrMissingEventID } path := fmt.Sprintf("/events/%s", i.EventID) resp, err := c.Get(path, nil) if err != nil { return nil, err } var event Event if err := jsonapi.UnmarshalPayload(resp.Body, &event); err !...
[ "func", "(", "c", "*", "Client", ")", "GetAPIEvent", "(", "i", "*", "GetAPIEventInput", ")", "(", "*", "Event", ",", "error", ")", "{", "if", "i", ".", "EventID", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingEventID", "\n", "}", "\n\n", ...
// GetAPIEvent gets a specific event
[ "GetAPIEvent", "gets", "a", "specific", "event" ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/event_logs.go#L103-L119
132,371
sethvargo/go-fastly
fastly/event_logs.go
interpretAPIEventsPage
func (c *Client) interpretAPIEventsPage(answer *GetAPIEventsResponse, pageNum int, received *http.Response) error { // before we pull the status info out of the response body, fetch // pagination info from it: pages, body, err := getEventsPages(received.Body) if err != nil { return err } answer.Links = pages d...
go
func (c *Client) interpretAPIEventsPage(answer *GetAPIEventsResponse, pageNum int, received *http.Response) error { // before we pull the status info out of the response body, fetch // pagination info from it: pages, body, err := getEventsPages(received.Body) if err != nil { return err } answer.Links = pages d...
[ "func", "(", "c", "*", "Client", ")", "interpretAPIEventsPage", "(", "answer", "*", "GetAPIEventsResponse", ",", "pageNum", "int", ",", "received", "*", "http", ".", "Response", ")", "error", "{", "// before we pull the status info out of the response body, fetch", "/...
// interpretAPIEventsPage accepts a Fastly response for a set of WAF rule statuses // and unmarshals the results. If there are more pages of results, it fetches the next // page, adds that response to the array of results, and repeats until all results have // been fetched.
[ "interpretAPIEventsPage", "accepts", "a", "Fastly", "response", "for", "a", "set", "of", "WAF", "rule", "statuses", "and", "unmarshals", "the", "results", ".", "If", "there", "are", "more", "pages", "of", "results", "it", "fetches", "the", "next", "page", "a...
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/event_logs.go#L125-L157
132,372
sethvargo/go-fastly
fastly/event_logs.go
getEventsPages
func getEventsPages(body io.Reader) (EventsPaginationInfo, io.Reader, error) { var buf bytes.Buffer tee := io.TeeReader(body, &buf) bodyBytes, err := ioutil.ReadAll(tee) if err != nil { return EventsPaginationInfo{}, nil, err } var pages *GetAPIEventsResponse json.Unmarshal(bodyBytes, &pages) return pages.L...
go
func getEventsPages(body io.Reader) (EventsPaginationInfo, io.Reader, error) { var buf bytes.Buffer tee := io.TeeReader(body, &buf) bodyBytes, err := ioutil.ReadAll(tee) if err != nil { return EventsPaginationInfo{}, nil, err } var pages *GetAPIEventsResponse json.Unmarshal(bodyBytes, &pages) return pages.L...
[ "func", "getEventsPages", "(", "body", "io", ".", "Reader", ")", "(", "EventsPaginationInfo", ",", "io", ".", "Reader", ",", "error", ")", "{", "var", "buf", "bytes", ".", "Buffer", "\n", "tee", ":=", "io", ".", "TeeReader", "(", "body", ",", "&", "b...
// getEventsPages parses a response to get the pagination data without destroying // the reader we receive as "resp.Body"; this essentially copies resp.Body // and returns it so we can use it again.
[ "getEventsPages", "parses", "a", "response", "to", "get", "the", "pagination", "data", "without", "destroying", "the", "reader", "we", "receive", "as", "resp", ".", "Body", ";", "this", "essentially", "copies", "resp", ".", "Body", "and", "returns", "it", "s...
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/event_logs.go#L162-L174
132,373
sethvargo/go-fastly
fastly/event_logs.go
formatEventFilters
func (i *GetAPIEventsFilterInput) formatEventFilters() map[string]string { result := map[string]string{} pairings := map[string]interface{}{ "filter[customer_id]": i.CustomerID, "filter[service_id]": i.ServiceID, "filter[event_type]": i.EventType, "filter[user_id]": i.UserID, "page[size]": i....
go
func (i *GetAPIEventsFilterInput) formatEventFilters() map[string]string { result := map[string]string{} pairings := map[string]interface{}{ "filter[customer_id]": i.CustomerID, "filter[service_id]": i.ServiceID, "filter[event_type]": i.EventType, "filter[user_id]": i.UserID, "page[size]": i....
[ "func", "(", "i", "*", "GetAPIEventsFilterInput", ")", "formatEventFilters", "(", ")", "map", "[", "string", "]", "string", "{", "result", ":=", "map", "[", "string", "]", "string", "{", "}", "\n", "pairings", ":=", "map", "[", "string", "]", "interface"...
// formatEventFilters converts user input into query parameters for filtering // Fastly events.
[ "formatEventFilters", "converts", "user", "input", "into", "query", "parameters", "for", "filtering", "Fastly", "events", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/event_logs.go#L178-L205
132,374
sethvargo/go-fastly
fastly/content.go
EdgeCheck
func (c *Client) EdgeCheck(i *EdgeCheckInput) ([]*EdgeCheck, error) { resp, err := c.Get("/content/edge_check", &RequestOptions{ Params: map[string]string{ "url": i.URL, }, }) if err != nil { return nil, err } var e []*EdgeCheck if err := decodeJSON(&e, resp.Body); err != nil { return nil, err } ret...
go
func (c *Client) EdgeCheck(i *EdgeCheckInput) ([]*EdgeCheck, error) { resp, err := c.Get("/content/edge_check", &RequestOptions{ Params: map[string]string{ "url": i.URL, }, }) if err != nil { return nil, err } var e []*EdgeCheck if err := decodeJSON(&e, resp.Body); err != nil { return nil, err } ret...
[ "func", "(", "c", "*", "Client", ")", "EdgeCheck", "(", "i", "*", "EdgeCheckInput", ")", "(", "[", "]", "*", "EdgeCheck", ",", "error", ")", "{", "resp", ",", "err", ":=", "c", ".", "Get", "(", "\"", "\"", ",", "&", "RequestOptions", "{", "Params...
// EdgeCheck queries the edge cache for all of Fastly's servers for the given // URL.
[ "EdgeCheck", "queries", "the", "edge", "cache", "for", "all", "of", "Fastly", "s", "servers", "for", "the", "given", "URL", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/content.go#L34-L49
132,375
sethvargo/go-fastly
fastly/logentries.go
ListLogentries
func (c *Client) ListLogentries(i *ListLogentriesInput) ([]*Logentries, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/logentries", i.Service, i.Version) resp, err := c.Get(path, nil) if e...
go
func (c *Client) ListLogentries(i *ListLogentriesInput) ([]*Logentries, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/logentries", i.Service, i.Version) resp, err := c.Get(path, nil) if e...
[ "func", "(", "c", "*", "Client", ")", "ListLogentries", "(", "i", "*", "ListLogentriesInput", ")", "(", "[", "]", "*", "Logentries", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", ...
// ListLogentries returns the list of logentries for the configuration version.
[ "ListLogentries", "returns", "the", "list", "of", "logentries", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/logentries.go#L47-L68
132,376
sethvargo/go-fastly
fastly/logentries.go
CreateLogentries
func (c *Client) CreateLogentries(i *CreateLogentriesInput) (*Logentries, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/logentries", i.Service, i.Version) resp, err := c.PostForm(path, i, ...
go
func (c *Client) CreateLogentries(i *CreateLogentriesInput) (*Logentries, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/logentries", i.Service, i.Version) resp, err := c.PostForm(path, i, ...
[ "func", "(", "c", "*", "Client", ")", "CreateLogentries", "(", "i", "*", "CreateLogentriesInput", ")", "(", "*", "Logentries", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}...
// CreateLogentries creates a new Fastly logentries.
[ "CreateLogentries", "creates", "a", "new", "Fastly", "logentries", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/logentries.go#L88-L108
132,377
sethvargo/go-fastly
fastly/logentries.go
GetLogentries
func (c *Client) GetLogentries(i *GetLogentriesInput) (*Logentries, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/logentries/%s", i.Servi...
go
func (c *Client) GetLogentries(i *GetLogentriesInput) (*Logentries, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/logentries/%s", i.Servi...
[ "func", "(", "c", "*", "Client", ")", "GetLogentries", "(", "i", "*", "GetLogentriesInput", ")", "(", "*", "Logentries", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "...
// GetLogentries gets the logentries configuration with the given parameters.
[ "GetLogentries", "gets", "the", "logentries", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/logentries.go#L122-L146
132,378
sethvargo/go-fastly
fastly/logentries.go
UpdateLogentries
func (c *Client) UpdateLogentries(i *UpdateLogentriesInput) (*Logentries, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/logentries/%s", i...
go
func (c *Client) UpdateLogentries(i *UpdateLogentriesInput) (*Logentries, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/logentries/%s", i...
[ "func", "(", "c", "*", "Client", ")", "UpdateLogentries", "(", "i", "*", "UpdateLogentriesInput", ")", "(", "*", "Logentries", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}...
// UpdateLogentries updates a specific logentries.
[ "UpdateLogentries", "updates", "a", "specific", "logentries", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/logentries.go#L169-L193
132,379
sethvargo/go-fastly
fastly/director_backend.go
CreateDirectorBackend
func (c *Client) CreateDirectorBackend(i *CreateDirectorBackendInput) (*DirectorBackend, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Director == "" { return nil, ErrMissingDirector } if i.Backend == "" { return nil, ErrMissingB...
go
func (c *Client) CreateDirectorBackend(i *CreateDirectorBackendInput) (*DirectorBackend, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Director == "" { return nil, ErrMissingDirector } if i.Backend == "" { return nil, ErrMissingB...
[ "func", "(", "c", "*", "Client", ")", "CreateDirectorBackend", "(", "i", "*", "CreateDirectorBackendInput", ")", "(", "*", "DirectorBackend", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService...
// CreateDirectorBackend creates a new Fastly backend.
[ "CreateDirectorBackend", "creates", "a", "new", "Fastly", "backend", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/director_backend.go#L37-L66
132,380
sethvargo/go-fastly
fastly/director_backend.go
GetDirectorBackend
func (c *Client) GetDirectorBackend(i *GetDirectorBackendInput) (*DirectorBackend, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Director == "" { return nil, ErrMissingDirector } if i.Backend == "" { return nil, ErrMissingBackend...
go
func (c *Client) GetDirectorBackend(i *GetDirectorBackendInput) (*DirectorBackend, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Director == "" { return nil, ErrMissingDirector } if i.Backend == "" { return nil, ErrMissingBackend...
[ "func", "(", "c", "*", "Client", ")", "GetDirectorBackend", "(", "i", "*", "GetDirectorBackendInput", ")", "(", "*", "DirectorBackend", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "...
// GetDirectorBackend gets the backend configuration with the given parameters.
[ "GetDirectorBackend", "gets", "the", "backend", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/director_backend.go#L83-L112
132,381
sethvargo/go-fastly
fastly/director_backend.go
DeleteDirectorBackend
func (c *Client) DeleteDirectorBackend(i *DeleteDirectorBackendInput) error { if i.Service == "" { return ErrMissingService } if i.Version == 0 { return ErrMissingVersion } if i.Director == "" { return ErrMissingDirector } if i.Backend == "" { return ErrMissingBackend } path := fmt.Sprintf("/servic...
go
func (c *Client) DeleteDirectorBackend(i *DeleteDirectorBackendInput) error { if i.Service == "" { return ErrMissingService } if i.Version == 0 { return ErrMissingVersion } if i.Director == "" { return ErrMissingDirector } if i.Backend == "" { return ErrMissingBackend } path := fmt.Sprintf("/servic...
[ "func", "(", "c", "*", "Client", ")", "DeleteDirectorBackend", "(", "i", "*", "DeleteDirectorBackendInput", ")", "error", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "ErrMissingService", "\n", "}", "\n\n", "if", "i", ".", "Version", ...
// DeleteDirectorBackend deletes the given backend version.
[ "DeleteDirectorBackend", "deletes", "the", "given", "backend", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/director_backend.go#L129-L161
132,382
sethvargo/go-fastly
fastly/syslog.go
ListSyslogs
func (c *Client) ListSyslogs(i *ListSyslogsInput) ([]*Syslog, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/syslog", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { ...
go
func (c *Client) ListSyslogs(i *ListSyslogsInput) ([]*Syslog, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/syslog", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { ...
[ "func", "(", "c", "*", "Client", ")", "ListSyslogs", "(", "i", "*", "ListSyslogsInput", ")", "(", "[", "]", "*", "Syslog", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}...
// ListSyslogs returns the list of syslogs for the configuration version.
[ "ListSyslogs", "returns", "the", "list", "of", "syslogs", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/syslog.go#L53-L74
132,383
sethvargo/go-fastly
fastly/syslog.go
CreateSyslog
func (c *Client) CreateSyslog(i *CreateSyslogInput) (*Syslog, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/syslog", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != ...
go
func (c *Client) CreateSyslog(i *CreateSyslogInput) (*Syslog, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/syslog", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != ...
[ "func", "(", "c", "*", "Client", ")", "CreateSyslog", "(", "i", "*", "CreateSyslogInput", ")", "(", "*", "Syslog", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n",...
// CreateSyslog creates a new Fastly syslog.
[ "CreateSyslog", "creates", "a", "new", "Fastly", "syslog", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/syslog.go#L100-L120
132,384
sethvargo/go-fastly
fastly/syslog.go
GetSyslog
func (c *Client) GetSyslog(i *GetSyslogInput) (*Syslog, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/syslog/%s", i.Service, i.Version, i...
go
func (c *Client) GetSyslog(i *GetSyslogInput) (*Syslog, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/syslog/%s", i.Service, i.Version, i...
[ "func", "(", "c", "*", "Client", ")", "GetSyslog", "(", "i", "*", "GetSyslogInput", ")", "(", "*", "Syslog", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if...
// GetSyslog gets the syslog configuration with the given parameters.
[ "GetSyslog", "gets", "the", "syslog", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/syslog.go#L134-L158
132,385
sethvargo/go-fastly
fastly/syslog.go
UpdateSyslog
func (c *Client) UpdateSyslog(i *UpdateSyslogInput) (*Syslog, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/syslog/%s", i.Service, i.Vers...
go
func (c *Client) UpdateSyslog(i *UpdateSyslogInput) (*Syslog, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/syslog/%s", i.Service, i.Vers...
[ "func", "(", "c", "*", "Client", ")", "UpdateSyslog", "(", "i", "*", "UpdateSyslogInput", ")", "(", "*", "Syslog", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n",...
// UpdateSyslog updates a specific syslog.
[ "UpdateSyslog", "updates", "a", "specific", "syslog", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/syslog.go#L187-L211
132,386
sethvargo/go-fastly
fastly/client.go
DefaultClient
func DefaultClient() *Client { client, err := NewClient(os.Getenv(APIKeyEnvVar)) if err != nil { panic(err) } return client }
go
func DefaultClient() *Client { client, err := NewClient(os.Getenv(APIKeyEnvVar)) if err != nil { panic(err) } return client }
[ "func", "DefaultClient", "(", ")", "*", "Client", "{", "client", ",", "err", ":=", "NewClient", "(", "os", ".", "Getenv", "(", "APIKeyEnvVar", ")", ")", "\n", "if", "err", "!=", "nil", "{", "panic", "(", "err", ")", "\n", "}", "\n", "return", "clie...
// DefaultClient instantiates a new Fastly API client. This function requires // the environment variable `FASTLY_API_KEY` is set and contains a valid API key // to authenticate with Fastly.
[ "DefaultClient", "instantiates", "a", "new", "Fastly", "API", "client", ".", "This", "function", "requires", "the", "environment", "variable", "FASTLY_API_KEY", "is", "set", "and", "contains", "a", "valid", "API", "key", "to", "authenticate", "with", "Fastly", "...
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L68-L74
132,387
sethvargo/go-fastly
fastly/client.go
NewClientForEndpoint
func NewClientForEndpoint(key string, endpoint string) (*Client, error) { client := &Client{apiKey: key, Address: endpoint} return client.init() }
go
func NewClientForEndpoint(key string, endpoint string) (*Client, error) { client := &Client{apiKey: key, Address: endpoint} return client.init() }
[ "func", "NewClientForEndpoint", "(", "key", "string", ",", "endpoint", "string", ")", "(", "*", "Client", ",", "error", ")", "{", "client", ":=", "&", "Client", "{", "apiKey", ":", "key", ",", "Address", ":", "endpoint", "}", "\n", "return", "client", ...
// NewClientForEndpoint creates a new API client with the given key and API // endpoint. Because Fastly allows some requests without an API key, this // function will not error if the API token is not supplied. Attempts to make a // request that requires an API key will return a 403 response.
[ "NewClientForEndpoint", "creates", "a", "new", "API", "client", "with", "the", "given", "key", "and", "API", "endpoint", ".", "Because", "Fastly", "allows", "some", "requests", "without", "an", "API", "key", "this", "function", "will", "not", "error", "if", ...
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L88-L91
132,388
sethvargo/go-fastly
fastly/client.go
NewRealtimeStatsClient
func NewRealtimeStatsClient() *RTSClient { c, err := NewClientForEndpoint(os.Getenv(APIKeyEnvVar), RealtimeStatsEndpoint) if err != nil { panic(err) } return &RTSClient{client: c} }
go
func NewRealtimeStatsClient() *RTSClient { c, err := NewClientForEndpoint(os.Getenv(APIKeyEnvVar), RealtimeStatsEndpoint) if err != nil { panic(err) } return &RTSClient{client: c} }
[ "func", "NewRealtimeStatsClient", "(", ")", "*", "RTSClient", "{", "c", ",", "err", ":=", "NewClientForEndpoint", "(", "os", ".", "Getenv", "(", "APIKeyEnvVar", ")", ",", "RealtimeStatsEndpoint", ")", "\n", "if", "err", "!=", "nil", "{", "panic", "(", "err...
// NewRealtimeStatsClient instantiates a new Fastly API client for the realtime stats. // This function requires the environment variable `FASTLY_API_KEY` is set and contains // a valid API key to authenticate with Fastly.
[ "NewRealtimeStatsClient", "instantiates", "a", "new", "Fastly", "API", "client", "for", "the", "realtime", "stats", ".", "This", "function", "requires", "the", "environment", "variable", "FASTLY_API_KEY", "is", "set", "and", "contains", "a", "valid", "API", "key",...
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L96-L102
132,389
sethvargo/go-fastly
fastly/client.go
Get
func (c *Client) Get(p string, ro *RequestOptions) (*http.Response, error) { return c.Request("GET", p, ro) }
go
func (c *Client) Get(p string, ro *RequestOptions) (*http.Response, error) { return c.Request("GET", p, ro) }
[ "func", "(", "c", "*", "Client", ")", "Get", "(", "p", "string", ",", "ro", "*", "RequestOptions", ")", "(", "*", "http", ".", "Response", ",", "error", ")", "{", "return", "c", ".", "Request", "(", "\"", "\"", ",", "p", ",", "ro", ")", "\n", ...
// Get issues an HTTP GET request.
[ "Get", "issues", "an", "HTTP", "GET", "request", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L119-L121
132,390
sethvargo/go-fastly
fastly/client.go
PatchForm
func (c *Client) PatchForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error) { return c.RequestForm("PATCH", p, i, ro) }
go
func (c *Client) PatchForm(p string, i interface{}, ro *RequestOptions) (*http.Response, error) { return c.RequestForm("PATCH", p, i, ro) }
[ "func", "(", "c", "*", "Client", ")", "PatchForm", "(", "p", "string", ",", "i", "interface", "{", "}", ",", "ro", "*", "RequestOptions", ")", "(", "*", "http", ".", "Response", ",", "error", ")", "{", "return", "c", ".", "RequestForm", "(", "\"", ...
// PatchForm issues an HTTP PUT request with the given interface form-encoded.
[ "PatchForm", "issues", "an", "HTTP", "PUT", "request", "with", "the", "given", "interface", "form", "-", "encoded", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L134-L136
132,391
sethvargo/go-fastly
fastly/client.go
PatchJSONAPI
func (c *Client) PatchJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error) { return c.RequestJSONAPI("PATCH", p, i, ro) }
go
func (c *Client) PatchJSONAPI(p string, i interface{}, ro *RequestOptions) (*http.Response, error) { return c.RequestJSONAPI("PATCH", p, i, ro) }
[ "func", "(", "c", "*", "Client", ")", "PatchJSONAPI", "(", "p", "string", ",", "i", "interface", "{", "}", ",", "ro", "*", "RequestOptions", ")", "(", "*", "http", ".", "Response", ",", "error", ")", "{", "return", "c", ".", "RequestJSONAPI", "(", ...
// PatchJSONAPI issues an HTTP PUT request with the given interface json-encoded.
[ "PatchJSONAPI", "issues", "an", "HTTP", "PUT", "request", "with", "the", "given", "interface", "json", "-", "encoded", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L144-L146
132,392
sethvargo/go-fastly
fastly/client.go
PutJSON
func (c *Client) PutJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error) { return c.RequestJSON("PUT", p, i, ro) }
go
func (c *Client) PutJSON(p string, i interface{}, ro *RequestOptions) (*http.Response, error) { return c.RequestJSON("PUT", p, i, ro) }
[ "func", "(", "c", "*", "Client", ")", "PutJSON", "(", "p", "string", ",", "i", "interface", "{", "}", ",", "ro", "*", "RequestOptions", ")", "(", "*", "http", ".", "Response", ",", "error", ")", "{", "return", "c", ".", "RequestJSON", "(", "\"", ...
// PutJSON issues an HTTP PUT request with the given interface json-encoded.
[ "PutJSON", "issues", "an", "HTTP", "PUT", "request", "with", "the", "given", "interface", "json", "-", "encoded", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L179-L181
132,393
sethvargo/go-fastly
fastly/client.go
Request
func (c *Client) Request(verb, p string, ro *RequestOptions) (*http.Response, error) { req, err := c.RawRequest(verb, p, ro) if err != nil { return nil, err } resp, err := checkResp(c.HTTPClient.Do(req)) if err != nil { return resp, err } return resp, nil }
go
func (c *Client) Request(verb, p string, ro *RequestOptions) (*http.Response, error) { req, err := c.RawRequest(verb, p, ro) if err != nil { return nil, err } resp, err := checkResp(c.HTTPClient.Do(req)) if err != nil { return resp, err } return resp, nil }
[ "func", "(", "c", "*", "Client", ")", "Request", "(", "verb", ",", "p", "string", ",", "ro", "*", "RequestOptions", ")", "(", "*", "http", ".", "Response", ",", "error", ")", "{", "req", ",", "err", ":=", "c", ".", "RawRequest", "(", "verb", ",",...
// Request makes an HTTP request against the HTTPClient using the given verb, // Path, and request options.
[ "Request", "makes", "an", "HTTP", "request", "against", "the", "HTTPClient", "using", "the", "given", "verb", "Path", "and", "request", "options", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L195-L207
132,394
sethvargo/go-fastly
fastly/client.go
RequestForm
func (c *Client) RequestForm(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error) { if ro == nil { ro = new(RequestOptions) } if ro.Headers == nil { ro.Headers = make(map[string]string) } ro.Headers["Content-Type"] = "application/x-www-form-urlencoded" buf := new(bytes.Buffer) if err ...
go
func (c *Client) RequestForm(verb, p string, i interface{}, ro *RequestOptions) (*http.Response, error) { if ro == nil { ro = new(RequestOptions) } if ro.Headers == nil { ro.Headers = make(map[string]string) } ro.Headers["Content-Type"] = "application/x-www-form-urlencoded" buf := new(bytes.Buffer) if err ...
[ "func", "(", "c", "*", "Client", ")", "RequestForm", "(", "verb", ",", "p", "string", ",", "i", "interface", "{", "}", ",", "ro", "*", "RequestOptions", ")", "(", "*", "http", ".", "Response", ",", "error", ")", "{", "if", "ro", "==", "nil", "{",...
// RequestForm makes an HTTP request with the given interface being encoded as // form data.
[ "RequestForm", "makes", "an", "HTTP", "request", "with", "the", "given", "interface", "being", "encoded", "as", "form", "data", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L211-L231
132,395
sethvargo/go-fastly
fastly/client.go
checkResp
func checkResp(resp *http.Response, err error) (*http.Response, error) { // If the err is already there, there was an error higher up the chain, so // just return that. if err != nil { return resp, err } switch resp.StatusCode { case 200, 201, 202, 204, 205, 206: return resp, nil default: return resp, New...
go
func checkResp(resp *http.Response, err error) (*http.Response, error) { // If the err is already there, there was an error higher up the chain, so // just return that. if err != nil { return resp, err } switch resp.StatusCode { case 200, 201, 202, 204, 205, 206: return resp, nil default: return resp, New...
[ "func", "checkResp", "(", "resp", "*", "http", ".", "Response", ",", "err", "error", ")", "(", "*", "http", ".", "Response", ",", "error", ")", "{", "// If the err is already there, there was an error higher up the chain, so", "// just return that.", "if", "err", "!...
// checkResp wraps an HTTP request from the default client and verifies that the // request was successful. A non-200 request returns an error formatted to // included any validation problems or otherwise.
[ "checkResp", "wraps", "an", "HTTP", "request", "from", "the", "default", "client", "and", "verifies", "that", "the", "request", "was", "successful", ".", "A", "non", "-", "200", "request", "returns", "an", "error", "formatted", "to", "included", "any", "vali...
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L280-L293
132,396
sethvargo/go-fastly
fastly/client.go
decodeJSON
func decodeJSON(out interface{}, body io.ReadCloser) error { defer body.Close() var parsed interface{} dec := json.NewDecoder(body) if err := dec.Decode(&parsed); err != nil { return err } decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ DecodeHook: mapstructure.ComposeDecodeHookFunc( ...
go
func decodeJSON(out interface{}, body io.ReadCloser) error { defer body.Close() var parsed interface{} dec := json.NewDecoder(body) if err := dec.Decode(&parsed); err != nil { return err } decoder, err := mapstructure.NewDecoder(&mapstructure.DecoderConfig{ DecodeHook: mapstructure.ComposeDecodeHookFunc( ...
[ "func", "decodeJSON", "(", "out", "interface", "{", "}", ",", "body", "io", ".", "ReadCloser", ")", "error", "{", "defer", "body", ".", "Close", "(", ")", "\n\n", "var", "parsed", "interface", "{", "}", "\n", "dec", ":=", "json", ".", "NewDecoder", "...
// decodeJSON is used to decode an HTTP response body into an interface as JSON.
[ "decodeJSON", "is", "used", "to", "decode", "an", "HTTP", "response", "body", "into", "an", "interface", "as", "JSON", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/client.go#L296-L317
132,397
sethvargo/go-fastly
fastly/s3.go
ListS3s
func (c *Client) ListS3s(i *ListS3sInput) ([]*S3, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/s3", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return nil, err ...
go
func (c *Client) ListS3s(i *ListS3sInput) ([]*S3, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/s3", i.Service, i.Version) resp, err := c.Get(path, nil) if err != nil { return nil, err ...
[ "func", "(", "c", "*", "Client", ")", "ListS3s", "(", "i", "*", "ListS3sInput", ")", "(", "[", "]", "*", "S3", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n",...
// ListS3s returns the list of S3s for the configuration version.
[ "ListS3s", "returns", "the", "list", "of", "S3s", "for", "the", "configuration", "version", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/s3.go#L61-L82
132,398
sethvargo/go-fastly
fastly/s3.go
CreateS3
func (c *Client) CreateS3(i *CreateS3Input) (*S3, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/s3", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != nil { return n...
go
func (c *Client) CreateS3(i *CreateS3Input) (*S3, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } path := fmt.Sprintf("/service/%s/version/%d/logging/s3", i.Service, i.Version) resp, err := c.PostForm(path, i, nil) if err != nil { return n...
[ "func", "(", "c", "*", "Client", ")", "CreateS3", "(", "i", "*", "CreateS3Input", ")", "(", "*", "S3", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", "...
// CreateS3 creates a new Fastly S3.
[ "CreateS3", "creates", "a", "new", "Fastly", "S3", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/s3.go#L109-L129
132,399
sethvargo/go-fastly
fastly/s3.go
GetS3
func (c *Client) GetS3(i *GetS3Input) (*S3, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/s3/%s", i.Service, i.Version, i.Name) resp, er...
go
func (c *Client) GetS3(i *GetS3Input) (*S3, error) { if i.Service == "" { return nil, ErrMissingService } if i.Version == 0 { return nil, ErrMissingVersion } if i.Name == "" { return nil, ErrMissingName } path := fmt.Sprintf("/service/%s/version/%d/logging/s3/%s", i.Service, i.Version, i.Name) resp, er...
[ "func", "(", "c", "*", "Client", ")", "GetS3", "(", "i", "*", "GetS3Input", ")", "(", "*", "S3", ",", "error", ")", "{", "if", "i", ".", "Service", "==", "\"", "\"", "{", "return", "nil", ",", "ErrMissingService", "\n", "}", "\n\n", "if", "i", ...
// GetS3 gets the S3 configuration with the given parameters.
[ "GetS3", "gets", "the", "S3", "configuration", "with", "the", "given", "parameters", "." ]
f249287bd4fda366a7f324f45a2308e934198464
https://github.com/sethvargo/go-fastly/blob/f249287bd4fda366a7f324f45a2308e934198464/fastly/s3.go#L143-L167