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 list | docstring stringlengths 6 2.61k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 85 252 |
|---|---|---|---|---|---|---|---|---|---|---|---|
23,900 | xanzy/go-cloudstack | cloudstack/NetworkOfferingService.go | NewDeleteNetworkOfferingParams | func (s *NetworkOfferingService) NewDeleteNetworkOfferingParams(id string) *DeleteNetworkOfferingParams {
p := &DeleteNetworkOfferingParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | go | func (s *NetworkOfferingService) NewDeleteNetworkOfferingParams(id string) *DeleteNetworkOfferingParams {
p := &DeleteNetworkOfferingParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | [
"func",
"(",
"s",
"*",
"NetworkOfferingService",
")",
"NewDeleteNetworkOfferingParams",
"(",
"id",
"string",
")",
"*",
"DeleteNetworkOfferingParams",
"{",
"p",
":=",
"&",
"DeleteNetworkOfferingParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[... | // You should always use this function to get a new DeleteNetworkOfferingParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DeleteNetworkOfferingParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkOfferingService.go#L388-L393 |
23,901 | xanzy/go-cloudstack | cloudstack/NetworkOfferingService.go | NewListNetworkOfferingsParams | func (s *NetworkOfferingService) NewListNetworkOfferingsParams() *ListNetworkOfferingsParams {
p := &ListNetworkOfferingsParams{}
p.p = make(map[string]interface{})
return p
} | go | func (s *NetworkOfferingService) NewListNetworkOfferingsParams() *ListNetworkOfferingsParams {
p := &ListNetworkOfferingsParams{}
p.p = make(map[string]interface{})
return p
} | [
"func",
"(",
"s",
"*",
"NetworkOfferingService",
")",
"NewListNetworkOfferingsParams",
"(",
")",
"*",
"ListNetworkOfferingsParams",
"{",
"p",
":=",
"&",
"ListNetworkOfferingsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
... | // You should always use this function to get a new ListNetworkOfferingsParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListNetworkOfferingsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkOfferingService.go#L677-L681 |
23,902 | xanzy/go-cloudstack | cloudstack/NetworkOfferingService.go | NewUpdateNetworkOfferingParams | func (s *NetworkOfferingService) NewUpdateNetworkOfferingParams() *UpdateNetworkOfferingParams {
p := &UpdateNetworkOfferingParams{}
p.p = make(map[string]interface{})
return p
} | go | func (s *NetworkOfferingService) NewUpdateNetworkOfferingParams() *UpdateNetworkOfferingParams {
p := &UpdateNetworkOfferingParams{}
p.p = make(map[string]interface{})
return p
} | [
"func",
"(",
"s",
"*",
"NetworkOfferingService",
")",
"NewUpdateNetworkOfferingParams",
"(",
")",
"*",
"UpdateNetworkOfferingParams",
"{",
"p",
":=",
"&",
"UpdateNetworkOfferingParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]"... | // You should always use this function to get a new UpdateNetworkOfferingParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"UpdateNetworkOfferingParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/NetworkOfferingService.go#L950-L954 |
23,903 | xanzy/go-cloudstack | cloudstack/AffinityGroupService.go | NewCreateAffinityGroupParams | func (s *AffinityGroupService) NewCreateAffinityGroupParams(name string, affinityGroupType string) *CreateAffinityGroupParams {
p := &CreateAffinityGroupParams{}
p.p = make(map[string]interface{})
p.p["name"] = name
p.p["type"] = affinityGroupType
return p
} | go | func (s *AffinityGroupService) NewCreateAffinityGroupParams(name string, affinityGroupType string) *CreateAffinityGroupParams {
p := &CreateAffinityGroupParams{}
p.p = make(map[string]interface{})
p.p["name"] = name
p.p["type"] = affinityGroupType
return p
} | [
"func",
"(",
"s",
"*",
"AffinityGroupService",
")",
"NewCreateAffinityGroupParams",
"(",
"name",
"string",
",",
"affinityGroupType",
"string",
")",
"*",
"CreateAffinityGroupParams",
"{",
"p",
":=",
"&",
"CreateAffinityGroupParams",
"{",
"}",
"\n",
"p",
".",
"p",
... | // You should always use this function to get a new CreateAffinityGroupParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"CreateAffinityGroupParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AffinityGroupService.go#L107-L113 |
23,904 | xanzy/go-cloudstack | cloudstack/AffinityGroupService.go | NewDeleteAffinityGroupParams | func (s *AffinityGroupService) NewDeleteAffinityGroupParams() *DeleteAffinityGroupParams {
p := &DeleteAffinityGroupParams{}
p.p = make(map[string]interface{})
return p
} | go | func (s *AffinityGroupService) NewDeleteAffinityGroupParams() *DeleteAffinityGroupParams {
p := &DeleteAffinityGroupParams{}
p.p = make(map[string]interface{})
return p
} | [
"func",
"(",
"s",
"*",
"AffinityGroupService",
")",
"NewDeleteAffinityGroupParams",
"(",
")",
"*",
"DeleteAffinityGroupParams",
"{",
"p",
":=",
"&",
"DeleteAffinityGroupParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"int... | // You should always use this function to get a new DeleteAffinityGroupParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DeleteAffinityGroupParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AffinityGroupService.go#L233-L237 |
23,905 | xanzy/go-cloudstack | cloudstack/AffinityGroupService.go | NewListAffinityGroupTypesParams | func (s *AffinityGroupService) NewListAffinityGroupTypesParams() *ListAffinityGroupTypesParams {
p := &ListAffinityGroupTypesParams{}
p.p = make(map[string]interface{})
return p
} | go | func (s *AffinityGroupService) NewListAffinityGroupTypesParams() *ListAffinityGroupTypesParams {
p := &ListAffinityGroupTypesParams{}
p.p = make(map[string]interface{})
return p
} | [
"func",
"(",
"s",
"*",
"AffinityGroupService",
")",
"NewListAffinityGroupTypesParams",
"(",
")",
"*",
"ListAffinityGroupTypesParams",
"{",
"p",
":=",
"&",
"ListAffinityGroupTypesParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]... | // You should always use this function to get a new ListAffinityGroupTypesParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListAffinityGroupTypesParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AffinityGroupService.go#L324-L328 |
23,906 | xanzy/go-cloudstack | cloudstack/AffinityGroupService.go | NewListAffinityGroupsParams | func (s *AffinityGroupService) NewListAffinityGroupsParams() *ListAffinityGroupsParams {
p := &ListAffinityGroupsParams{}
p.p = make(map[string]interface{})
return p
} | go | func (s *AffinityGroupService) NewListAffinityGroupsParams() *ListAffinityGroupsParams {
p := &ListAffinityGroupsParams{}
p.p = make(map[string]interface{})
return p
} | [
"func",
"(",
"s",
"*",
"AffinityGroupService",
")",
"NewListAffinityGroupsParams",
"(",
")",
"*",
"ListAffinityGroupsParams",
"{",
"p",
":=",
"&",
"ListAffinityGroupsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interf... | // You should always use this function to get a new ListAffinityGroupsParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListAffinityGroupsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AffinityGroupService.go#L504-L508 |
23,907 | xanzy/go-cloudstack | cloudstack/AffinityGroupService.go | NewUpdateVMAffinityGroupParams | func (s *AffinityGroupService) NewUpdateVMAffinityGroupParams(id string) *UpdateVMAffinityGroupParams {
p := &UpdateVMAffinityGroupParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | go | func (s *AffinityGroupService) NewUpdateVMAffinityGroupParams(id string) *UpdateVMAffinityGroupParams {
p := &UpdateVMAffinityGroupParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | [
"func",
"(",
"s",
"*",
"AffinityGroupService",
")",
"NewUpdateVMAffinityGroupParams",
"(",
"id",
"string",
")",
"*",
"UpdateVMAffinityGroupParams",
"{",
"p",
":=",
"&",
"UpdateVMAffinityGroupParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",... | // You should always use this function to get a new UpdateVMAffinityGroupParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"UpdateVMAffinityGroupParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AffinityGroupService.go#L683-L688 |
23,908 | xanzy/go-cloudstack | cloudstack/StratosphereSSPService.go | NewAddStratosphereSspParams | func (s *StratosphereSSPService) NewAddStratosphereSspParams(name string, url string, zoneid string) *AddStratosphereSspParams {
p := &AddStratosphereSspParams{}
p.p = make(map[string]interface{})
p.p["name"] = name
p.p["url"] = url
p.p["zoneid"] = zoneid
return p
} | go | func (s *StratosphereSSPService) NewAddStratosphereSspParams(name string, url string, zoneid string) *AddStratosphereSspParams {
p := &AddStratosphereSspParams{}
p.p = make(map[string]interface{})
p.p["name"] = name
p.p["url"] = url
p.p["zoneid"] = zoneid
return p
} | [
"func",
"(",
"s",
"*",
"StratosphereSSPService",
")",
"NewAddStratosphereSspParams",
"(",
"name",
"string",
",",
"url",
"string",
",",
"zoneid",
"string",
")",
"*",
"AddStratosphereSspParams",
"{",
"p",
":=",
"&",
"AddStratosphereSspParams",
"{",
"}",
"\n",
"p",... | // You should always use this function to get a new AddStratosphereSspParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"AddStratosphereSspParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/StratosphereSSPService.go#L104-L111 |
23,909 | xanzy/go-cloudstack | cloudstack/StratosphereSSPService.go | AddStratosphereSsp | func (s *StratosphereSSPService) AddStratosphereSsp(p *AddStratosphereSspParams) (*AddStratosphereSspResponse, error) {
resp, err := s.cs.newRequest("addStratosphereSsp", p.toURLValues())
if err != nil {
return nil, err
}
var r AddStratosphereSspResponse
if err := json.Unmarshal(resp, &r); err != nil {
return... | go | func (s *StratosphereSSPService) AddStratosphereSsp(p *AddStratosphereSspParams) (*AddStratosphereSspResponse, error) {
resp, err := s.cs.newRequest("addStratosphereSsp", p.toURLValues())
if err != nil {
return nil, err
}
var r AddStratosphereSspResponse
if err := json.Unmarshal(resp, &r); err != nil {
return... | [
"func",
"(",
"s",
"*",
"StratosphereSSPService",
")",
"AddStratosphereSsp",
"(",
"p",
"*",
"AddStratosphereSspParams",
")",
"(",
"*",
"AddStratosphereSspResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\""... | // Adds stratosphere ssp server | [
"Adds",
"stratosphere",
"ssp",
"server"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/StratosphereSSPService.go#L114-L126 |
23,910 | xanzy/go-cloudstack | cloudstack/StratosphereSSPService.go | NewDeleteStratosphereSspParams | func (s *StratosphereSSPService) NewDeleteStratosphereSspParams(hostid string) *DeleteStratosphereSspParams {
p := &DeleteStratosphereSspParams{}
p.p = make(map[string]interface{})
p.p["hostid"] = hostid
return p
} | go | func (s *StratosphereSSPService) NewDeleteStratosphereSspParams(hostid string) *DeleteStratosphereSspParams {
p := &DeleteStratosphereSspParams{}
p.p = make(map[string]interface{})
p.p["hostid"] = hostid
return p
} | [
"func",
"(",
"s",
"*",
"StratosphereSSPService",
")",
"NewDeleteStratosphereSspParams",
"(",
"hostid",
"string",
")",
"*",
"DeleteStratosphereSspParams",
"{",
"p",
":=",
"&",
"DeleteStratosphereSspParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
... | // You should always use this function to get a new DeleteStratosphereSspParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DeleteStratosphereSspParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/StratosphereSSPService.go#L160-L165 |
23,911 | xanzy/go-cloudstack | cloudstack/StratosphereSSPService.go | DeleteStratosphereSsp | func (s *StratosphereSSPService) DeleteStratosphereSsp(p *DeleteStratosphereSspParams) (*DeleteStratosphereSspResponse, error) {
resp, err := s.cs.newRequest("deleteStratosphereSsp", p.toURLValues())
if err != nil {
return nil, err
}
var r DeleteStratosphereSspResponse
if err := json.Unmarshal(resp, &r); err !=... | go | func (s *StratosphereSSPService) DeleteStratosphereSsp(p *DeleteStratosphereSspParams) (*DeleteStratosphereSspResponse, error) {
resp, err := s.cs.newRequest("deleteStratosphereSsp", p.toURLValues())
if err != nil {
return nil, err
}
var r DeleteStratosphereSspResponse
if err := json.Unmarshal(resp, &r); err !=... | [
"func",
"(",
"s",
"*",
"StratosphereSSPService",
")",
"DeleteStratosphereSsp",
"(",
"p",
"*",
"DeleteStratosphereSspParams",
")",
"(",
"*",
"DeleteStratosphereSspResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(... | // Removes stratosphere ssp server | [
"Removes",
"stratosphere",
"ssp",
"server"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/StratosphereSSPService.go#L168-L180 |
23,912 | xanzy/go-cloudstack | cloudstack/AlertService.go | NewArchiveAlertsParams | func (s *AlertService) NewArchiveAlertsParams() *ArchiveAlertsParams {
p := &ArchiveAlertsParams{}
p.p = make(map[string]interface{})
return p
} | go | func (s *AlertService) NewArchiveAlertsParams() *ArchiveAlertsParams {
p := &ArchiveAlertsParams{}
p.p = make(map[string]interface{})
return p
} | [
"func",
"(",
"s",
"*",
"AlertService",
")",
"NewArchiveAlertsParams",
"(",
")",
"*",
"ArchiveAlertsParams",
"{",
"p",
":=",
"&",
"ArchiveAlertsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
"... | // You should always use this function to get a new ArchiveAlertsParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ArchiveAlertsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AlertService.go#L86-L90 |
23,913 | xanzy/go-cloudstack | cloudstack/AlertService.go | ArchiveAlerts | func (s *AlertService) ArchiveAlerts(p *ArchiveAlertsParams) (*ArchiveAlertsResponse, error) {
resp, err := s.cs.newRequest("archiveAlerts", p.toURLValues())
if err != nil {
return nil, err
}
var r ArchiveAlertsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
} | go | func (s *AlertService) ArchiveAlerts(p *ArchiveAlertsParams) (*ArchiveAlertsResponse, error) {
resp, err := s.cs.newRequest("archiveAlerts", p.toURLValues())
if err != nil {
return nil, err
}
var r ArchiveAlertsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
} | [
"func",
"(",
"s",
"*",
"AlertService",
")",
"ArchiveAlerts",
"(",
"p",
"*",
"ArchiveAlertsParams",
")",
"(",
"*",
"ArchiveAlertsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
... | // Archive one or more alerts. | [
"Archive",
"one",
"or",
"more",
"alerts",
"."
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AlertService.go#L93-L105 |
23,914 | xanzy/go-cloudstack | cloudstack/AlertService.go | NewDeleteAlertsParams | func (s *AlertService) NewDeleteAlertsParams() *DeleteAlertsParams {
p := &DeleteAlertsParams{}
p.p = make(map[string]interface{})
return p
} | go | func (s *AlertService) NewDeleteAlertsParams() *DeleteAlertsParams {
p := &DeleteAlertsParams{}
p.p = make(map[string]interface{})
return p
} | [
"func",
"(",
"s",
"*",
"AlertService",
")",
"NewDeleteAlertsParams",
"(",
")",
"*",
"DeleteAlertsParams",
"{",
"p",
":=",
"&",
"DeleteAlertsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",... | // You should always use this function to get a new DeleteAlertsParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DeleteAlertsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AlertService.go#L190-L194 |
23,915 | xanzy/go-cloudstack | cloudstack/AlertService.go | DeleteAlerts | func (s *AlertService) DeleteAlerts(p *DeleteAlertsParams) (*DeleteAlertsResponse, error) {
resp, err := s.cs.newRequest("deleteAlerts", p.toURLValues())
if err != nil {
return nil, err
}
var r DeleteAlertsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
} | go | func (s *AlertService) DeleteAlerts(p *DeleteAlertsParams) (*DeleteAlertsResponse, error) {
resp, err := s.cs.newRequest("deleteAlerts", p.toURLValues())
if err != nil {
return nil, err
}
var r DeleteAlertsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
} | [
"func",
"(",
"s",
"*",
"AlertService",
")",
"DeleteAlerts",
"(",
"p",
"*",
"DeleteAlertsParams",
")",
"(",
"*",
"DeleteAlertsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".... | // Delete one or more alerts. | [
"Delete",
"one",
"or",
"more",
"alerts",
"."
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AlertService.go#L197-L209 |
23,916 | xanzy/go-cloudstack | cloudstack/AlertService.go | NewGenerateAlertParams | func (s *AlertService) NewGenerateAlertParams(description string, name string, alertType int) *GenerateAlertParams {
p := &GenerateAlertParams{}
p.p = make(map[string]interface{})
p.p["description"] = description
p.p["name"] = name
p.p["type"] = alertType
return p
} | go | func (s *AlertService) NewGenerateAlertParams(description string, name string, alertType int) *GenerateAlertParams {
p := &GenerateAlertParams{}
p.p = make(map[string]interface{})
p.p["description"] = description
p.p["name"] = name
p.p["type"] = alertType
return p
} | [
"func",
"(",
"s",
"*",
"AlertService",
")",
"NewGenerateAlertParams",
"(",
"description",
"string",
",",
"name",
"string",
",",
"alertType",
"int",
")",
"*",
"GenerateAlertParams",
"{",
"p",
":=",
"&",
"GenerateAlertParams",
"{",
"}",
"\n",
"p",
".",
"p",
... | // You should always use this function to get a new GenerateAlertParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"GenerateAlertParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AlertService.go#L305-L312 |
23,917 | xanzy/go-cloudstack | cloudstack/AlertService.go | GenerateAlert | func (s *AlertService) GenerateAlert(p *GenerateAlertParams) (*GenerateAlertResponse, error) {
resp, err := s.cs.newRequest("generateAlert", p.toURLValues())
if err != nil {
return nil, err
}
var r GenerateAlertResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
// If we have a asyn... | go | func (s *AlertService) GenerateAlert(p *GenerateAlertParams) (*GenerateAlertResponse, error) {
resp, err := s.cs.newRequest("generateAlert", p.toURLValues())
if err != nil {
return nil, err
}
var r GenerateAlertResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
// If we have a asyn... | [
"func",
"(",
"s",
"*",
"AlertService",
")",
"GenerateAlert",
"(",
"p",
"*",
"GenerateAlertParams",
")",
"(",
"*",
"GenerateAlertResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
... | // Generates an alert | [
"Generates",
"an",
"alert"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AlertService.go#L315-L342 |
23,918 | xanzy/go-cloudstack | cloudstack/AlertService.go | NewListAlertsParams | func (s *AlertService) NewListAlertsParams() *ListAlertsParams {
p := &ListAlertsParams{}
p.p = make(map[string]interface{})
return p
} | go | func (s *AlertService) NewListAlertsParams() *ListAlertsParams {
p := &ListAlertsParams{}
p.p = make(map[string]interface{})
return p
} | [
"func",
"(",
"s",
"*",
"AlertService",
")",
"NewListAlertsParams",
"(",
")",
"*",
"ListAlertsParams",
"{",
"p",
":=",
"&",
"ListAlertsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
"\n... | // You should always use this function to get a new ListAlertsParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListAlertsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AlertService.go#L432-L436 |
23,919 | xanzy/go-cloudstack | cloudstack/AlertService.go | ListAlerts | func (s *AlertService) ListAlerts(p *ListAlertsParams) (*ListAlertsResponse, error) {
resp, err := s.cs.newRequest("listAlerts", p.toURLValues())
if err != nil {
return nil, err
}
var r ListAlertsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
} | go | func (s *AlertService) ListAlerts(p *ListAlertsParams) (*ListAlertsResponse, error) {
resp, err := s.cs.newRequest("listAlerts", p.toURLValues())
if err != nil {
return nil, err
}
var r ListAlertsResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
} | [
"func",
"(",
"s",
"*",
"AlertService",
")",
"ListAlerts",
"(",
"p",
"*",
"ListAlertsParams",
")",
"(",
"*",
"ListAlertsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
"... | // Lists all alerts. | [
"Lists",
"all",
"alerts",
"."
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/AlertService.go#L522-L534 |
23,920 | xanzy/go-cloudstack | cloudstack/RouterService.go | NewChangeServiceForRouterParams | func (s *RouterService) NewChangeServiceForRouterParams(id string, serviceofferingid string) *ChangeServiceForRouterParams {
p := &ChangeServiceForRouterParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
p.p["serviceofferingid"] = serviceofferingid
return p
} | go | func (s *RouterService) NewChangeServiceForRouterParams(id string, serviceofferingid string) *ChangeServiceForRouterParams {
p := &ChangeServiceForRouterParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
p.p["serviceofferingid"] = serviceofferingid
return p
} | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"NewChangeServiceForRouterParams",
"(",
"id",
"string",
",",
"serviceofferingid",
"string",
")",
"*",
"ChangeServiceForRouterParams",
"{",
"p",
":=",
"&",
"ChangeServiceForRouterParams",
"{",
"}",
"\n",
"p",
".",
"p",
... | // You should always use this function to get a new ChangeServiceForRouterParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ChangeServiceForRouterParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L63-L69 |
23,921 | xanzy/go-cloudstack | cloudstack/RouterService.go | ChangeServiceForRouter | func (s *RouterService) ChangeServiceForRouter(p *ChangeServiceForRouterParams) (*ChangeServiceForRouterResponse, error) {
resp, err := s.cs.newRequest("changeServiceForRouter", p.toURLValues())
if err != nil {
return nil, err
}
var r ChangeServiceForRouterResponse
if err := json.Unmarshal(resp, &r); err != nil... | go | func (s *RouterService) ChangeServiceForRouter(p *ChangeServiceForRouterParams) (*ChangeServiceForRouterResponse, error) {
resp, err := s.cs.newRequest("changeServiceForRouter", p.toURLValues())
if err != nil {
return nil, err
}
var r ChangeServiceForRouterResponse
if err := json.Unmarshal(resp, &r); err != nil... | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"ChangeServiceForRouter",
"(",
"p",
"*",
"ChangeServiceForRouterParams",
")",
"(",
"*",
"ChangeServiceForRouterResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"... | // Upgrades domain router to a new service offering | [
"Upgrades",
"domain",
"router",
"to",
"a",
"new",
"service",
"offering"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L72-L84 |
23,922 | xanzy/go-cloudstack | cloudstack/RouterService.go | NewConfigureVirtualRouterElementParams | func (s *RouterService) NewConfigureVirtualRouterElementParams(enabled bool, id string) *ConfigureVirtualRouterElementParams {
p := &ConfigureVirtualRouterElementParams{}
p.p = make(map[string]interface{})
p.p["enabled"] = enabled
p.p["id"] = id
return p
} | go | func (s *RouterService) NewConfigureVirtualRouterElementParams(enabled bool, id string) *ConfigureVirtualRouterElementParams {
p := &ConfigureVirtualRouterElementParams{}
p.p = make(map[string]interface{})
p.p["enabled"] = enabled
p.p["id"] = id
return p
} | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"NewConfigureVirtualRouterElementParams",
"(",
"enabled",
"bool",
",",
"id",
"string",
")",
"*",
"ConfigureVirtualRouterElementParams",
"{",
"p",
":=",
"&",
"ConfigureVirtualRouterElementParams",
"{",
"}",
"\n",
"p",
".",... | // You should always use this function to get a new ConfigureVirtualRouterElementParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ConfigureVirtualRouterElementParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L172-L178 |
23,923 | xanzy/go-cloudstack | cloudstack/RouterService.go | ConfigureVirtualRouterElement | func (s *RouterService) ConfigureVirtualRouterElement(p *ConfigureVirtualRouterElementParams) (*VirtualRouterElementResponse, error) {
resp, err := s.cs.newRequest("configureVirtualRouterElement", p.toURLValues())
if err != nil {
return nil, err
}
var r VirtualRouterElementResponse
if err := json.Unmarshal(resp... | go | func (s *RouterService) ConfigureVirtualRouterElement(p *ConfigureVirtualRouterElementParams) (*VirtualRouterElementResponse, error) {
resp, err := s.cs.newRequest("configureVirtualRouterElement", p.toURLValues())
if err != nil {
return nil, err
}
var r VirtualRouterElementResponse
if err := json.Unmarshal(resp... | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"ConfigureVirtualRouterElement",
"(",
"p",
"*",
"ConfigureVirtualRouterElementParams",
")",
"(",
"*",
"VirtualRouterElementResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest"... | // Configures a virtual router element. | [
"Configures",
"a",
"virtual",
"router",
"element",
"."
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L181-L213 |
23,924 | xanzy/go-cloudstack | cloudstack/RouterService.go | NewCreateVirtualRouterElementParams | func (s *RouterService) NewCreateVirtualRouterElementParams(nspid string) *CreateVirtualRouterElementParams {
p := &CreateVirtualRouterElementParams{}
p.p = make(map[string]interface{})
p.p["nspid"] = nspid
return p
} | go | func (s *RouterService) NewCreateVirtualRouterElementParams(nspid string) *CreateVirtualRouterElementParams {
p := &CreateVirtualRouterElementParams{}
p.p = make(map[string]interface{})
p.p["nspid"] = nspid
return p
} | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"NewCreateVirtualRouterElementParams",
"(",
"nspid",
"string",
")",
"*",
"CreateVirtualRouterElementParams",
"{",
"p",
":=",
"&",
"CreateVirtualRouterElementParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"m... | // You should always use this function to get a new CreateVirtualRouterElementParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"CreateVirtualRouterElementParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L263-L268 |
23,925 | xanzy/go-cloudstack | cloudstack/RouterService.go | CreateVirtualRouterElement | func (s *RouterService) CreateVirtualRouterElement(p *CreateVirtualRouterElementParams) (*CreateVirtualRouterElementResponse, error) {
resp, err := s.cs.newRequest("createVirtualRouterElement", p.toURLValues())
if err != nil {
return nil, err
}
var r CreateVirtualRouterElementResponse
if err := json.Unmarshal(r... | go | func (s *RouterService) CreateVirtualRouterElement(p *CreateVirtualRouterElementParams) (*CreateVirtualRouterElementResponse, error) {
resp, err := s.cs.newRequest("createVirtualRouterElement", p.toURLValues())
if err != nil {
return nil, err
}
var r CreateVirtualRouterElementResponse
if err := json.Unmarshal(r... | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"CreateVirtualRouterElement",
"(",
"p",
"*",
"CreateVirtualRouterElementParams",
")",
"(",
"*",
"CreateVirtualRouterElementResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest"... | // Create a virtual router element. | [
"Create",
"a",
"virtual",
"router",
"element",
"."
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L271-L303 |
23,926 | xanzy/go-cloudstack | cloudstack/RouterService.go | NewDestroyRouterParams | func (s *RouterService) NewDestroyRouterParams(id string) *DestroyRouterParams {
p := &DestroyRouterParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | go | func (s *RouterService) NewDestroyRouterParams(id string) *DestroyRouterParams {
p := &DestroyRouterParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"NewDestroyRouterParams",
"(",
"id",
"string",
")",
"*",
"DestroyRouterParams",
"{",
"p",
":=",
"&",
"DestroyRouterParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interfac... | // You should always use this function to get a new DestroyRouterParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"DestroyRouterParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L342-L347 |
23,927 | xanzy/go-cloudstack | cloudstack/RouterService.go | DestroyRouter | func (s *RouterService) DestroyRouter(p *DestroyRouterParams) (*DestroyRouterResponse, error) {
resp, err := s.cs.newRequest("destroyRouter", p.toURLValues())
if err != nil {
return nil, err
}
var r DestroyRouterResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
// If we have a asy... | go | func (s *RouterService) DestroyRouter(p *DestroyRouterParams) (*DestroyRouterResponse, error) {
resp, err := s.cs.newRequest("destroyRouter", p.toURLValues())
if err != nil {
return nil, err
}
var r DestroyRouterResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
// If we have a asy... | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"DestroyRouter",
"(",
"p",
"*",
"DestroyRouterParams",
")",
"(",
"*",
"DestroyRouterResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
... | // Destroys a router. | [
"Destroys",
"a",
"router",
"."
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L350-L382 |
23,928 | xanzy/go-cloudstack | cloudstack/RouterService.go | NewListRoutersParams | func (s *RouterService) NewListRoutersParams() *ListRoutersParams {
p := &ListRoutersParams{}
p.p = make(map[string]interface{})
return p
} | go | func (s *RouterService) NewListRoutersParams() *ListRoutersParams {
p := &ListRoutersParams{}
p.p = make(map[string]interface{})
return p
} | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"NewListRoutersParams",
"(",
")",
"*",
"ListRoutersParams",
"{",
"p",
":=",
"&",
"ListRoutersParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{",
"}",
")",
... | // You should always use this function to get a new ListRoutersParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListRoutersParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L662-L666 |
23,929 | xanzy/go-cloudstack | cloudstack/RouterService.go | ListRouters | func (s *RouterService) ListRouters(p *ListRoutersParams) (*ListRoutersResponse, error) {
resp, err := s.cs.newRequest("listRouters", p.toURLValues())
if err != nil {
return nil, err
}
var r ListRoutersResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
} | go | func (s *RouterService) ListRouters(p *ListRoutersParams) (*ListRoutersResponse, error) {
resp, err := s.cs.newRequest("listRouters", p.toURLValues())
if err != nil {
return nil, err
}
var r ListRoutersResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
return &r, nil
} | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"ListRouters",
"(",
"p",
"*",
"ListRoutersParams",
")",
"(",
"*",
"ListRoutersResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",... | // List routers. | [
"List",
"routers",
"."
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L752-L764 |
23,930 | xanzy/go-cloudstack | cloudstack/RouterService.go | NewListVirtualRouterElementsParams | func (s *RouterService) NewListVirtualRouterElementsParams() *ListVirtualRouterElementsParams {
p := &ListVirtualRouterElementsParams{}
p.p = make(map[string]interface{})
return p
} | go | func (s *RouterService) NewListVirtualRouterElementsParams() *ListVirtualRouterElementsParams {
p := &ListVirtualRouterElementsParams{}
p.p = make(map[string]interface{})
return p
} | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"NewListVirtualRouterElementsParams",
"(",
")",
"*",
"ListVirtualRouterElementsParams",
"{",
"p",
":=",
"&",
"ListVirtualRouterElementsParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
... | // You should always use this function to get a new ListVirtualRouterElementsParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"ListVirtualRouterElementsParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L903-L907 |
23,931 | xanzy/go-cloudstack | cloudstack/RouterService.go | ListVirtualRouterElements | func (s *RouterService) ListVirtualRouterElements(p *ListVirtualRouterElementsParams) (*ListVirtualRouterElementsResponse, error) {
resp, err := s.cs.newRequest("listVirtualRouterElements", p.toURLValues())
if err != nil {
return nil, err
}
var r ListVirtualRouterElementsResponse
if err := json.Unmarshal(resp, ... | go | func (s *RouterService) ListVirtualRouterElements(p *ListVirtualRouterElementsParams) (*ListVirtualRouterElementsResponse, error) {
resp, err := s.cs.newRequest("listVirtualRouterElements", p.toURLValues())
if err != nil {
return nil, err
}
var r ListVirtualRouterElementsResponse
if err := json.Unmarshal(resp, ... | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"ListVirtualRouterElements",
"(",
"p",
"*",
"ListVirtualRouterElementsParams",
")",
"(",
"*",
"ListVirtualRouterElementsResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
... | // Lists all available virtual router elements. | [
"Lists",
"all",
"available",
"virtual",
"router",
"elements",
"."
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L943-L955 |
23,932 | xanzy/go-cloudstack | cloudstack/RouterService.go | NewRebootRouterParams | func (s *RouterService) NewRebootRouterParams(id string) *RebootRouterParams {
p := &RebootRouterParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | go | func (s *RouterService) NewRebootRouterParams(id string) *RebootRouterParams {
p := &RebootRouterParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"NewRebootRouterParams",
"(",
"id",
"string",
")",
"*",
"RebootRouterParams",
"{",
"p",
":=",
"&",
"RebootRouterParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",... | // You should always use this function to get a new RebootRouterParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"RebootRouterParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L998-L1003 |
23,933 | xanzy/go-cloudstack | cloudstack/RouterService.go | NewStartRouterParams | func (s *RouterService) NewStartRouterParams(id string) *StartRouterParams {
p := &StartRouterParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | go | func (s *RouterService) NewStartRouterParams(id string) *StartRouterParams {
p := &StartRouterParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"NewStartRouterParams",
"(",
"id",
"string",
")",
"*",
"StartRouterParams",
"{",
"p",
":=",
"&",
"StartRouterParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
... | // You should always use this function to get a new StartRouterParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"StartRouterParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L1115-L1120 |
23,934 | xanzy/go-cloudstack | cloudstack/RouterService.go | NewStopRouterParams | func (s *RouterService) NewStopRouterParams(id string) *StopRouterParams {
p := &StopRouterParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | go | func (s *RouterService) NewStopRouterParams(id string) *StopRouterParams {
p := &StopRouterParams{}
p.p = make(map[string]interface{})
p.p["id"] = id
return p
} | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"NewStopRouterParams",
"(",
"id",
"string",
")",
"*",
"StopRouterParams",
"{",
"p",
":=",
"&",
"StopRouterParams",
"{",
"}",
"\n",
"p",
".",
"p",
"=",
"make",
"(",
"map",
"[",
"string",
"]",
"interface",
"{"... | // You should always use this function to get a new StopRouterParams instance,
// as then you are sure you have configured all required params | [
"You",
"should",
"always",
"use",
"this",
"function",
"to",
"get",
"a",
"new",
"StopRouterParams",
"instance",
"as",
"then",
"you",
"are",
"sure",
"you",
"have",
"configured",
"all",
"required",
"params"
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L1244-L1249 |
23,935 | xanzy/go-cloudstack | cloudstack/RouterService.go | StopRouter | func (s *RouterService) StopRouter(p *StopRouterParams) (*StopRouterResponse, error) {
resp, err := s.cs.newRequest("stopRouter", p.toURLValues())
if err != nil {
return nil, err
}
var r StopRouterResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
// If we have a async client, we n... | go | func (s *RouterService) StopRouter(p *StopRouterParams) (*StopRouterResponse, error) {
resp, err := s.cs.newRequest("stopRouter", p.toURLValues())
if err != nil {
return nil, err
}
var r StopRouterResponse
if err := json.Unmarshal(resp, &r); err != nil {
return nil, err
}
// If we have a async client, we n... | [
"func",
"(",
"s",
"*",
"RouterService",
")",
"StopRouter",
"(",
"p",
"*",
"StopRouterParams",
")",
"(",
"*",
"StopRouterResponse",
",",
"error",
")",
"{",
"resp",
",",
"err",
":=",
"s",
".",
"cs",
".",
"newRequest",
"(",
"\"",
"\"",
",",
"p",
".",
... | // Stops a router. | [
"Stops",
"a",
"router",
"."
] | b6f53ed3282d22b6446422879587b0a78e1b0f11 | https://github.com/xanzy/go-cloudstack/blob/b6f53ed3282d22b6446422879587b0a78e1b0f11/cloudstack/RouterService.go#L1252-L1284 |
23,936 | hashicorp/go-rootcerts | rootcerts.go | ConfigureTLS | func ConfigureTLS(t *tls.Config, c *Config) error {
if t == nil {
return nil
}
pool, err := LoadCACerts(c)
if err != nil {
return err
}
t.RootCAs = pool
return nil
} | go | func ConfigureTLS(t *tls.Config, c *Config) error {
if t == nil {
return nil
}
pool, err := LoadCACerts(c)
if err != nil {
return err
}
t.RootCAs = pool
return nil
} | [
"func",
"ConfigureTLS",
"(",
"t",
"*",
"tls",
".",
"Config",
",",
"c",
"*",
"Config",
")",
"error",
"{",
"if",
"t",
"==",
"nil",
"{",
"return",
"nil",
"\n",
"}",
"\n",
"pool",
",",
"err",
":=",
"LoadCACerts",
"(",
"c",
")",
"\n",
"if",
"err",
"... | // ConfigureTLS sets up the RootCAs on the provided tls.Config based on the
// Config specified. | [
"ConfigureTLS",
"sets",
"up",
"the",
"RootCAs",
"on",
"the",
"provided",
"tls",
".",
"Config",
"based",
"on",
"the",
"Config",
"specified",
"."
] | 63503fb4e1eca22f9ae0f90b49c5d5538a0e87eb | https://github.com/hashicorp/go-rootcerts/blob/63503fb4e1eca22f9ae0f90b49c5d5538a0e87eb/rootcerts.go#L27-L37 |
23,937 | hashicorp/go-rootcerts | rootcerts.go | LoadCACerts | func LoadCACerts(c *Config) (*x509.CertPool, error) {
if c == nil {
c = &Config{}
}
if c.CAFile != "" {
return LoadCAFile(c.CAFile)
}
if c.CAPath != "" {
return LoadCAPath(c.CAPath)
}
return LoadSystemCAs()
} | go | func LoadCACerts(c *Config) (*x509.CertPool, error) {
if c == nil {
c = &Config{}
}
if c.CAFile != "" {
return LoadCAFile(c.CAFile)
}
if c.CAPath != "" {
return LoadCAPath(c.CAPath)
}
return LoadSystemCAs()
} | [
"func",
"LoadCACerts",
"(",
"c",
"*",
"Config",
")",
"(",
"*",
"x509",
".",
"CertPool",
",",
"error",
")",
"{",
"if",
"c",
"==",
"nil",
"{",
"c",
"=",
"&",
"Config",
"{",
"}",
"\n",
"}",
"\n",
"if",
"c",
".",
"CAFile",
"!=",
"\"",
"\"",
"{",
... | // LoadCACerts loads a CertPool based on the Config specified. | [
"LoadCACerts",
"loads",
"a",
"CertPool",
"based",
"on",
"the",
"Config",
"specified",
"."
] | 63503fb4e1eca22f9ae0f90b49c5d5538a0e87eb | https://github.com/hashicorp/go-rootcerts/blob/63503fb4e1eca22f9ae0f90b49c5d5538a0e87eb/rootcerts.go#L40-L52 |
23,938 | hashicorp/go-rootcerts | rootcerts.go | LoadCAFile | func LoadCAFile(caFile string) (*x509.CertPool, error) {
pool := x509.NewCertPool()
pem, err := ioutil.ReadFile(caFile)
if err != nil {
return nil, fmt.Errorf("Error loading CA File: %s", err)
}
ok := pool.AppendCertsFromPEM(pem)
if !ok {
return nil, fmt.Errorf("Error loading CA File: Couldn't parse PEM in:... | go | func LoadCAFile(caFile string) (*x509.CertPool, error) {
pool := x509.NewCertPool()
pem, err := ioutil.ReadFile(caFile)
if err != nil {
return nil, fmt.Errorf("Error loading CA File: %s", err)
}
ok := pool.AppendCertsFromPEM(pem)
if !ok {
return nil, fmt.Errorf("Error loading CA File: Couldn't parse PEM in:... | [
"func",
"LoadCAFile",
"(",
"caFile",
"string",
")",
"(",
"*",
"x509",
".",
"CertPool",
",",
"error",
")",
"{",
"pool",
":=",
"x509",
".",
"NewCertPool",
"(",
")",
"\n\n",
"pem",
",",
"err",
":=",
"ioutil",
".",
"ReadFile",
"(",
"caFile",
")",
"\n",
... | // LoadCAFile loads a single PEM-encoded file from the path specified. | [
"LoadCAFile",
"loads",
"a",
"single",
"PEM",
"-",
"encoded",
"file",
"from",
"the",
"path",
"specified",
"."
] | 63503fb4e1eca22f9ae0f90b49c5d5538a0e87eb | https://github.com/hashicorp/go-rootcerts/blob/63503fb4e1eca22f9ae0f90b49c5d5538a0e87eb/rootcerts.go#L55-L69 |
23,939 | hashicorp/go-rootcerts | rootcerts.go | LoadCAPath | func LoadCAPath(caPath string) (*x509.CertPool, error) {
pool := x509.NewCertPool()
walkFn := func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if info.IsDir() {
return nil
}
pem, err := ioutil.ReadFile(path)
if err != nil {
return fmt.Errorf("Error loading fil... | go | func LoadCAPath(caPath string) (*x509.CertPool, error) {
pool := x509.NewCertPool()
walkFn := func(path string, info os.FileInfo, err error) error {
if err != nil {
return err
}
if info.IsDir() {
return nil
}
pem, err := ioutil.ReadFile(path)
if err != nil {
return fmt.Errorf("Error loading fil... | [
"func",
"LoadCAPath",
"(",
"caPath",
"string",
")",
"(",
"*",
"x509",
".",
"CertPool",
",",
"error",
")",
"{",
"pool",
":=",
"x509",
".",
"NewCertPool",
"(",
")",
"\n",
"walkFn",
":=",
"func",
"(",
"path",
"string",
",",
"info",
"os",
".",
"FileInfo"... | // LoadCAPath walks the provided path and loads all certificates encounted into
// a pool. | [
"LoadCAPath",
"walks",
"the",
"provided",
"path",
"and",
"loads",
"all",
"certificates",
"encounted",
"into",
"a",
"pool",
"."
] | 63503fb4e1eca22f9ae0f90b49c5d5538a0e87eb | https://github.com/hashicorp/go-rootcerts/blob/63503fb4e1eca22f9ae0f90b49c5d5538a0e87eb/rootcerts.go#L73-L103 |
23,940 | hashicorp/go-rootcerts | rootcerts_darwin.go | LoadSystemCAs | func LoadSystemCAs() (*x509.CertPool, error) {
pool := x509.NewCertPool()
for _, keychain := range certKeychains() {
err := addCertsFromKeychain(pool, keychain)
if err != nil {
return nil, err
}
}
return pool, nil
} | go | func LoadSystemCAs() (*x509.CertPool, error) {
pool := x509.NewCertPool()
for _, keychain := range certKeychains() {
err := addCertsFromKeychain(pool, keychain)
if err != nil {
return nil, err
}
}
return pool, nil
} | [
"func",
"LoadSystemCAs",
"(",
")",
"(",
"*",
"x509",
".",
"CertPool",
",",
"error",
")",
"{",
"pool",
":=",
"x509",
".",
"NewCertPool",
"(",
")",
"\n\n",
"for",
"_",
",",
"keychain",
":=",
"range",
"certKeychains",
"(",
")",
"{",
"err",
":=",
"addCer... | // LoadSystemCAs has special behavior on Darwin systems to work around | [
"LoadSystemCAs",
"has",
"special",
"behavior",
"on",
"Darwin",
"systems",
"to",
"work",
"around"
] | 63503fb4e1eca22f9ae0f90b49c5d5538a0e87eb | https://github.com/hashicorp/go-rootcerts/blob/63503fb4e1eca22f9ae0f90b49c5d5538a0e87eb/rootcerts_darwin.go#L12-L23 |
23,941 | beevik/ntp | ntp.go | Duration | func (t ntpTime) Duration() time.Duration {
sec := (t >> 32) * nanoPerSec
frac := (t & 0xffffffff) * nanoPerSec >> 32
return time.Duration(sec + frac)
} | go | func (t ntpTime) Duration() time.Duration {
sec := (t >> 32) * nanoPerSec
frac := (t & 0xffffffff) * nanoPerSec >> 32
return time.Duration(sec + frac)
} | [
"func",
"(",
"t",
"ntpTime",
")",
"Duration",
"(",
")",
"time",
".",
"Duration",
"{",
"sec",
":=",
"(",
"t",
">>",
"32",
")",
"*",
"nanoPerSec",
"\n",
"frac",
":=",
"(",
"t",
"&",
"0xffffffff",
")",
"*",
"nanoPerSec",
">>",
"32",
"\n",
"return",
... | // Duration interprets the fixed-point ntpTime as a number of elapsed seconds
// and returns the corresponding time.Duration value. | [
"Duration",
"interprets",
"the",
"fixed",
"-",
"point",
"ntpTime",
"as",
"a",
"number",
"of",
"elapsed",
"seconds",
"and",
"returns",
"the",
"corresponding",
"time",
".",
"Duration",
"value",
"."
] | 53ffc1864695f04a9261eaaba263b1e85e5795f3 | https://github.com/beevik/ntp/blob/53ffc1864695f04a9261eaaba263b1e85e5795f3/ntp.go#L77-L81 |
23,942 | beevik/ntp | ntp.go | toNtpTime | func toNtpTime(t time.Time) ntpTime {
nsec := uint64(t.Sub(ntpEpoch))
sec := nsec / nanoPerSec
// Round up the fractional component so that repeated conversions
// between time.Time and ntpTime do not yield continually decreasing
// results.
frac := (((nsec - sec*nanoPerSec) << 32) + nanoPerSec - 1) / nanoPerSec
... | go | func toNtpTime(t time.Time) ntpTime {
nsec := uint64(t.Sub(ntpEpoch))
sec := nsec / nanoPerSec
// Round up the fractional component so that repeated conversions
// between time.Time and ntpTime do not yield continually decreasing
// results.
frac := (((nsec - sec*nanoPerSec) << 32) + nanoPerSec - 1) / nanoPerSec
... | [
"func",
"toNtpTime",
"(",
"t",
"time",
".",
"Time",
")",
"ntpTime",
"{",
"nsec",
":=",
"uint64",
"(",
"t",
".",
"Sub",
"(",
"ntpEpoch",
")",
")",
"\n",
"sec",
":=",
"nsec",
"/",
"nanoPerSec",
"\n",
"// Round up the fractional component so that repeated convers... | // toNtpTime converts the time.Time value t into its 64-bit fixed-point
// ntpTime representation. | [
"toNtpTime",
"converts",
"the",
"time",
".",
"Time",
"value",
"t",
"into",
"its",
"64",
"-",
"bit",
"fixed",
"-",
"point",
"ntpTime",
"representation",
"."
] | 53ffc1864695f04a9261eaaba263b1e85e5795f3 | https://github.com/beevik/ntp/blob/53ffc1864695f04a9261eaaba263b1e85e5795f3/ntp.go#L91-L99 |
23,943 | beevik/ntp | ntp.go | Duration | func (t ntpTimeShort) Duration() time.Duration {
t64 := uint64(t)
sec := (t64 >> 16) * nanoPerSec
frac := (t64 & 0xffff) * nanoPerSec >> 16
return time.Duration(sec + frac)
} | go | func (t ntpTimeShort) Duration() time.Duration {
t64 := uint64(t)
sec := (t64 >> 16) * nanoPerSec
frac := (t64 & 0xffff) * nanoPerSec >> 16
return time.Duration(sec + frac)
} | [
"func",
"(",
"t",
"ntpTimeShort",
")",
"Duration",
"(",
")",
"time",
".",
"Duration",
"{",
"t64",
":=",
"uint64",
"(",
"t",
")",
"\n",
"sec",
":=",
"(",
"t64",
">>",
"16",
")",
"*",
"nanoPerSec",
"\n",
"frac",
":=",
"(",
"t64",
"&",
"0xffff",
")"... | // Duration interprets the fixed-point ntpTimeShort as a number of elapsed
// seconds and returns the corresponding time.Duration value. | [
"Duration",
"interprets",
"the",
"fixed",
"-",
"point",
"ntpTimeShort",
"as",
"a",
"number",
"of",
"elapsed",
"seconds",
"and",
"returns",
"the",
"corresponding",
"time",
".",
"Duration",
"value",
"."
] | 53ffc1864695f04a9261eaaba263b1e85e5795f3 | https://github.com/beevik/ntp/blob/53ffc1864695f04a9261eaaba263b1e85e5795f3/ntp.go#L107-L112 |
23,944 | beevik/ntp | ntp.go | setVersion | func (m *msg) setVersion(v int) {
m.LiVnMode = (m.LiVnMode & 0xc7) | uint8(v)<<3
} | go | func (m *msg) setVersion(v int) {
m.LiVnMode = (m.LiVnMode & 0xc7) | uint8(v)<<3
} | [
"func",
"(",
"m",
"*",
"msg",
")",
"setVersion",
"(",
"v",
"int",
")",
"{",
"m",
".",
"LiVnMode",
"=",
"(",
"m",
".",
"LiVnMode",
"&",
"0xc7",
")",
"|",
"uint8",
"(",
"v",
")",
"<<",
"3",
"\n",
"}"
] | // setVersion sets the NTP protocol version on the message. | [
"setVersion",
"sets",
"the",
"NTP",
"protocol",
"version",
"on",
"the",
"message",
"."
] | 53ffc1864695f04a9261eaaba263b1e85e5795f3 | https://github.com/beevik/ntp/blob/53ffc1864695f04a9261eaaba263b1e85e5795f3/ntp.go#L130-L132 |
23,945 | beevik/ntp | ntp.go | setMode | func (m *msg) setMode(md mode) {
m.LiVnMode = (m.LiVnMode & 0xf8) | uint8(md)
} | go | func (m *msg) setMode(md mode) {
m.LiVnMode = (m.LiVnMode & 0xf8) | uint8(md)
} | [
"func",
"(",
"m",
"*",
"msg",
")",
"setMode",
"(",
"md",
"mode",
")",
"{",
"m",
".",
"LiVnMode",
"=",
"(",
"m",
".",
"LiVnMode",
"&",
"0xf8",
")",
"|",
"uint8",
"(",
"md",
")",
"\n",
"}"
] | // setMode sets the NTP protocol mode on the message. | [
"setMode",
"sets",
"the",
"NTP",
"protocol",
"mode",
"on",
"the",
"message",
"."
] | 53ffc1864695f04a9261eaaba263b1e85e5795f3 | https://github.com/beevik/ntp/blob/53ffc1864695f04a9261eaaba263b1e85e5795f3/ntp.go#L135-L137 |
23,946 | beevik/ntp | ntp.go | setLeap | func (m *msg) setLeap(li LeapIndicator) {
m.LiVnMode = (m.LiVnMode & 0x3f) | uint8(li)<<6
} | go | func (m *msg) setLeap(li LeapIndicator) {
m.LiVnMode = (m.LiVnMode & 0x3f) | uint8(li)<<6
} | [
"func",
"(",
"m",
"*",
"msg",
")",
"setLeap",
"(",
"li",
"LeapIndicator",
")",
"{",
"m",
".",
"LiVnMode",
"=",
"(",
"m",
".",
"LiVnMode",
"&",
"0x3f",
")",
"|",
"uint8",
"(",
"li",
")",
"<<",
"6",
"\n",
"}"
] | // setLeap modifies the leap indicator on the message. | [
"setLeap",
"modifies",
"the",
"leap",
"indicator",
"on",
"the",
"message",
"."
] | 53ffc1864695f04a9261eaaba263b1e85e5795f3 | https://github.com/beevik/ntp/blob/53ffc1864695f04a9261eaaba263b1e85e5795f3/ntp.go#L140-L142 |
23,947 | beevik/ntp | ntp.go | Validate | func (r *Response) Validate() error {
// Handle invalid stratum values.
if r.Stratum == 0 {
return fmt.Errorf("kiss of death received: %s", r.KissCode)
}
if r.Stratum >= maxStratum {
return errors.New("invalid stratum in response")
}
// Handle invalid leap second indicator.
if r.Leap == LeapNotInSync {
re... | go | func (r *Response) Validate() error {
// Handle invalid stratum values.
if r.Stratum == 0 {
return fmt.Errorf("kiss of death received: %s", r.KissCode)
}
if r.Stratum >= maxStratum {
return errors.New("invalid stratum in response")
}
// Handle invalid leap second indicator.
if r.Leap == LeapNotInSync {
re... | [
"func",
"(",
"r",
"*",
"Response",
")",
"Validate",
"(",
")",
"error",
"{",
"// Handle invalid stratum values.",
"if",
"r",
".",
"Stratum",
"==",
"0",
"{",
"return",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"r",
".",
"KissCode",
")",
"\n",
"}",
"\... | // Validate checks if the response is valid for the purposes of time
// synchronization. | [
"Validate",
"checks",
"if",
"the",
"response",
"is",
"valid",
"for",
"the",
"purposes",
"of",
"time",
"synchronization",
"."
] | 53ffc1864695f04a9261eaaba263b1e85e5795f3 | https://github.com/beevik/ntp/blob/53ffc1864695f04a9261eaaba263b1e85e5795f3/ntp.go#L240-L279 |
23,948 | beevik/ntp | ntp.go | QueryWithOptions | func QueryWithOptions(host string, opt QueryOptions) (*Response, error) {
m, now, err := getTime(host, opt)
if err != nil {
return nil, err
}
return parseTime(m, now), nil
} | go | func QueryWithOptions(host string, opt QueryOptions) (*Response, error) {
m, now, err := getTime(host, opt)
if err != nil {
return nil, err
}
return parseTime(m, now), nil
} | [
"func",
"QueryWithOptions",
"(",
"host",
"string",
",",
"opt",
"QueryOptions",
")",
"(",
"*",
"Response",
",",
"error",
")",
"{",
"m",
",",
"now",
",",
"err",
":=",
"getTime",
"(",
"host",
",",
"opt",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"retu... | // QueryWithOptions performs the same function as Query but allows for the
// customization of several query options. | [
"QueryWithOptions",
"performs",
"the",
"same",
"function",
"as",
"Query",
"but",
"allows",
"for",
"the",
"customization",
"of",
"several",
"query",
"options",
"."
] | 53ffc1864695f04a9261eaaba263b1e85e5795f3 | https://github.com/beevik/ntp/blob/53ffc1864695f04a9261eaaba263b1e85e5795f3/ntp.go#L290-L296 |
23,949 | beevik/ntp | ntp.go | parseTime | func parseTime(m *msg, recvTime ntpTime) *Response {
r := &Response{
Time: m.TransmitTime.Time(),
ClockOffset: offset(m.OriginTime, m.ReceiveTime, m.TransmitTime, recvTime),
RTT: rtt(m.OriginTime, m.ReceiveTime, m.TransmitTime, recvTime),
Precision: toInterval(m.Precision),
Strat... | go | func parseTime(m *msg, recvTime ntpTime) *Response {
r := &Response{
Time: m.TransmitTime.Time(),
ClockOffset: offset(m.OriginTime, m.ReceiveTime, m.TransmitTime, recvTime),
RTT: rtt(m.OriginTime, m.ReceiveTime, m.TransmitTime, recvTime),
Precision: toInterval(m.Precision),
Strat... | [
"func",
"parseTime",
"(",
"m",
"*",
"msg",
",",
"recvTime",
"ntpTime",
")",
"*",
"Response",
"{",
"r",
":=",
"&",
"Response",
"{",
"Time",
":",
"m",
".",
"TransmitTime",
".",
"Time",
"(",
")",
",",
"ClockOffset",
":",
"offset",
"(",
"m",
".",
"Orig... | // parseTime parses the NTP packet along with the packet receive time to
// generate a Response record. | [
"parseTime",
"parses",
"the",
"NTP",
"packet",
"along",
"with",
"the",
"packet",
"receive",
"time",
"to",
"generate",
"a",
"Response",
"record",
"."
] | 53ffc1864695f04a9261eaaba263b1e85e5795f3 | https://github.com/beevik/ntp/blob/53ffc1864695f04a9261eaaba263b1e85e5795f3/ntp.go#L452-L478 |
23,950 | secsy/goftp | file_system.go | Delete | func (c *Client) Delete(path string) error {
pconn, err := c.getIdleConn()
if err != nil {
return err
}
defer c.returnConn(pconn)
return pconn.sendCommandExpected(replyFileActionOkay, "DELE %s", path)
} | go | func (c *Client) Delete(path string) error {
pconn, err := c.getIdleConn()
if err != nil {
return err
}
defer c.returnConn(pconn)
return pconn.sendCommandExpected(replyFileActionOkay, "DELE %s", path)
} | [
"func",
"(",
"c",
"*",
"Client",
")",
"Delete",
"(",
"path",
"string",
")",
"error",
"{",
"pconn",
",",
"err",
":=",
"c",
".",
"getIdleConn",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"defer",
"c",
".",
... | // Delete deletes the file "path". | [
"Delete",
"deletes",
"the",
"file",
"path",
"."
] | 012609e90524f0bfde77100facdc47f807794c27 | https://github.com/secsy/goftp/blob/012609e90524f0bfde77100facdc47f807794c27/file_system.go#L22-L31 |
23,951 | secsy/goftp | file_system.go | Rename | func (c *Client) Rename(from, to string) error {
pconn, err := c.getIdleConn()
if err != nil {
return err
}
defer c.returnConn(pconn)
err = pconn.sendCommandExpected(replyFileActionPending, "RNFR %s", from)
if err != nil {
return err
}
return pconn.sendCommandExpected(replyFileActionOkay, "RNTO %s", to)
... | go | func (c *Client) Rename(from, to string) error {
pconn, err := c.getIdleConn()
if err != nil {
return err
}
defer c.returnConn(pconn)
err = pconn.sendCommandExpected(replyFileActionPending, "RNFR %s", from)
if err != nil {
return err
}
return pconn.sendCommandExpected(replyFileActionOkay, "RNTO %s", to)
... | [
"func",
"(",
"c",
"*",
"Client",
")",
"Rename",
"(",
"from",
",",
"to",
"string",
")",
"error",
"{",
"pconn",
",",
"err",
":=",
"c",
".",
"getIdleConn",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"err",
"\n",
"}",
"\n\n",
"defer",
... | // Rename renames file "from" to "to". | [
"Rename",
"renames",
"file",
"from",
"to",
"to",
"."
] | 012609e90524f0bfde77100facdc47f807794c27 | https://github.com/secsy/goftp/blob/012609e90524f0bfde77100facdc47f807794c27/file_system.go#L34-L48 |
23,952 | secsy/goftp | file_system.go | Mkdir | func (c *Client) Mkdir(path string) (string, error) {
pconn, err := c.getIdleConn()
if err != nil {
return "", err
}
defer c.returnConn(pconn)
code, msg, err := pconn.sendCommand("MKD %s", path)
if err != nil {
return "", err
}
if code != replyDirCreated {
return "", ftpError{code: code, msg: msg}
}
... | go | func (c *Client) Mkdir(path string) (string, error) {
pconn, err := c.getIdleConn()
if err != nil {
return "", err
}
defer c.returnConn(pconn)
code, msg, err := pconn.sendCommand("MKD %s", path)
if err != nil {
return "", err
}
if code != replyDirCreated {
return "", ftpError{code: code, msg: msg}
}
... | [
"func",
"(",
"c",
"*",
"Client",
")",
"Mkdir",
"(",
"path",
"string",
")",
"(",
"string",
",",
"error",
")",
"{",
"pconn",
",",
"err",
":=",
"c",
".",
"getIdleConn",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"\"",
"\"",
",",
"err... | // Mkdir creates directory "path". The returned string is how the client
// should refer to the created directory. | [
"Mkdir",
"creates",
"directory",
"path",
".",
"The",
"returned",
"string",
"is",
"how",
"the",
"client",
"should",
"refer",
"to",
"the",
"created",
"directory",
"."
] | 012609e90524f0bfde77100facdc47f807794c27 | https://github.com/secsy/goftp/blob/012609e90524f0bfde77100facdc47f807794c27/file_system.go#L52-L75 |
23,953 | secsy/goftp | transfer.go | Retrieve | func (c *Client) Retrieve(path string, dest io.Writer) error {
// fetch file size to check against how much we transferred
size, err := c.size(path)
if err != nil {
return err
}
canResume := c.canResume()
var bytesSoFar int64
for {
n, err := c.transferFromOffset(path, dest, nil, bytesSoFar)
bytesSoFar +... | go | func (c *Client) Retrieve(path string, dest io.Writer) error {
// fetch file size to check against how much we transferred
size, err := c.size(path)
if err != nil {
return err
}
canResume := c.canResume()
var bytesSoFar int64
for {
n, err := c.transferFromOffset(path, dest, nil, bytesSoFar)
bytesSoFar +... | [
"func",
"(",
"c",
"*",
"Client",
")",
"Retrieve",
"(",
"path",
"string",
",",
"dest",
"io",
".",
"Writer",
")",
"error",
"{",
"// fetch file size to check against how much we transferred",
"size",
",",
"err",
":=",
"c",
".",
"size",
"(",
"path",
")",
"\n",
... | // Retrieve file "path" from server and write bytes to "dest". If the
// server supports resuming stream transfers, Retrieve will continue
// resuming a failed download as long as it continues making progress.
// Retrieve will also verify the file's size after the transfer if the
// server supports the SIZE command. | [
"Retrieve",
"file",
"path",
"from",
"server",
"and",
"write",
"bytes",
"to",
"dest",
".",
"If",
"the",
"server",
"supports",
"resuming",
"stream",
"transfers",
"Retrieve",
"will",
"continue",
"resuming",
"a",
"failed",
"download",
"as",
"long",
"as",
"it",
"... | 012609e90524f0bfde77100facdc47f807794c27 | https://github.com/secsy/goftp/blob/012609e90524f0bfde77100facdc47f807794c27/transfer.go#L19-L54 |
23,954 | secsy/goftp | transfer.go | size | func (c *Client) size(path string) (int64, error) {
pconn, err := c.getIdleConn()
if err != nil {
return -1, err
}
defer c.returnConn(pconn)
if !pconn.hasFeature("SIZE") {
pconn.debug("server doesn't support SIZE")
return -1, nil
}
if err = pconn.setType("I"); err != nil {
return 0, err
}
code, msg... | go | func (c *Client) size(path string) (int64, error) {
pconn, err := c.getIdleConn()
if err != nil {
return -1, err
}
defer c.returnConn(pconn)
if !pconn.hasFeature("SIZE") {
pconn.debug("server doesn't support SIZE")
return -1, nil
}
if err = pconn.setType("I"); err != nil {
return 0, err
}
code, msg... | [
"func",
"(",
"c",
"*",
"Client",
")",
"size",
"(",
"path",
"string",
")",
"(",
"int64",
",",
"error",
")",
"{",
"pconn",
",",
"err",
":=",
"c",
".",
"getIdleConn",
"(",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"-",
"1",
",",
"err",
... | // Fetch SIZE of file. Returns error only on underlying connection error.
// If the server doesn't support size, it returns -1 and no error. | [
"Fetch",
"SIZE",
"of",
"file",
".",
"Returns",
"error",
"only",
"on",
"underlying",
"connection",
"error",
".",
"If",
"the",
"server",
"doesn",
"t",
"support",
"size",
"it",
"returns",
"-",
"1",
"and",
"no",
"error",
"."
] | 012609e90524f0bfde77100facdc47f807794c27 | https://github.com/secsy/goftp/blob/012609e90524f0bfde77100facdc47f807794c27/transfer.go#L224-L258 |
23,955 | secsy/goftp | client.go | newClient | func newClient(config Config, hosts []string) *Client {
if config.ConnectionsPerHost <= 0 {
config.ConnectionsPerHost = 5
}
if config.Timeout <= 0 {
config.Timeout = 5 * time.Second
}
if config.User == "" {
config.User = "anonymous"
}
if config.Password == "" {
config.Password = "anonymous"
}
if c... | go | func newClient(config Config, hosts []string) *Client {
if config.ConnectionsPerHost <= 0 {
config.ConnectionsPerHost = 5
}
if config.Timeout <= 0 {
config.Timeout = 5 * time.Second
}
if config.User == "" {
config.User = "anonymous"
}
if config.Password == "" {
config.Password = "anonymous"
}
if c... | [
"func",
"newClient",
"(",
"config",
"Config",
",",
"hosts",
"[",
"]",
"string",
")",
"*",
"Client",
"{",
"if",
"config",
".",
"ConnectionsPerHost",
"<=",
"0",
"{",
"config",
".",
"ConnectionsPerHost",
"=",
"5",
"\n",
"}",
"\n\n",
"if",
"config",
".",
"... | // Construct and return a new client Conn, setting default config
// values as necessary. | [
"Construct",
"and",
"return",
"a",
"new",
"client",
"Conn",
"setting",
"default",
"config",
"values",
"as",
"necessary",
"."
] | 012609e90524f0bfde77100facdc47f807794c27 | https://github.com/secsy/goftp/blob/012609e90524f0bfde77100facdc47f807794c27/client.go#L175-L209 |
23,956 | secsy/goftp | client.go | Close | func (c *Client) Close() error {
c.mu.Lock()
if c.closed {
c.mu.Unlock()
return ftpError{err: errors.New("already closed")}
}
c.closed = true
var conns []*persistentConn
for _, conn := range c.allCons {
conns = append(conns, conn)
}
c.mu.Unlock()
for _, pconn := range conns {
c.removeConn(pconn)
}
... | go | func (c *Client) Close() error {
c.mu.Lock()
if c.closed {
c.mu.Unlock()
return ftpError{err: errors.New("already closed")}
}
c.closed = true
var conns []*persistentConn
for _, conn := range c.allCons {
conns = append(conns, conn)
}
c.mu.Unlock()
for _, pconn := range conns {
c.removeConn(pconn)
}
... | [
"func",
"(",
"c",
"*",
"Client",
")",
"Close",
"(",
")",
"error",
"{",
"c",
".",
"mu",
".",
"Lock",
"(",
")",
"\n",
"if",
"c",
".",
"closed",
"{",
"c",
".",
"mu",
".",
"Unlock",
"(",
")",
"\n",
"return",
"ftpError",
"{",
"err",
":",
"errors",... | // Close closes all open server connections. Currently this does not attempt
// to do any kind of polite FTP connection termination. It will interrupt
// all transfers in progress. | [
"Close",
"closes",
"all",
"open",
"server",
"connections",
".",
"Currently",
"this",
"does",
"not",
"attempt",
"to",
"do",
"any",
"kind",
"of",
"polite",
"FTP",
"connection",
"termination",
".",
"It",
"will",
"interrupt",
"all",
"transfers",
"in",
"progress",
... | 012609e90524f0bfde77100facdc47f807794c27 | https://github.com/secsy/goftp/blob/012609e90524f0bfde77100facdc47f807794c27/client.go#L214-L233 |
23,957 | secsy/goftp | client.go | getIdleConn | func (c *Client) getIdleConn() (*persistentConn, error) {
// First check for available connections in the channel.
Loop:
for {
select {
case pconn := <-c.freeConnCh:
if pconn.broken {
c.debug("#%d was ready (broken)", pconn.idx)
c.mu.Lock()
c.numConnsPerHost[pconn.host]--
c.mu.Unlock()
c.r... | go | func (c *Client) getIdleConn() (*persistentConn, error) {
// First check for available connections in the channel.
Loop:
for {
select {
case pconn := <-c.freeConnCh:
if pconn.broken {
c.debug("#%d was ready (broken)", pconn.idx)
c.mu.Lock()
c.numConnsPerHost[pconn.host]--
c.mu.Unlock()
c.r... | [
"func",
"(",
"c",
"*",
"Client",
")",
"getIdleConn",
"(",
")",
"(",
"*",
"persistentConn",
",",
"error",
")",
"{",
"// First check for available connections in the channel.",
"Loop",
":",
"for",
"{",
"select",
"{",
"case",
"pconn",
":=",
"<-",
"c",
".",
"fre... | // Get an idle connection. | [
"Get",
"an",
"idle",
"connection",
"."
] | 012609e90524f0bfde77100facdc47f807794c27 | https://github.com/secsy/goftp/blob/012609e90524f0bfde77100facdc47f807794c27/client.go#L257-L333 |
23,958 | secsy/goftp | client.go | openConn | func (c *Client) openConn(idx int, host string) (pconn *persistentConn, err error) {
pconn = &persistentConn{
idx: idx,
features: make(map[string]string),
config: c.config,
t0: c.t0,
currentType: "A",
host: host,
epsvNotSupported: c.config.Dis... | go | func (c *Client) openConn(idx int, host string) (pconn *persistentConn, err error) {
pconn = &persistentConn{
idx: idx,
features: make(map[string]string),
config: c.config,
t0: c.t0,
currentType: "A",
host: host,
epsvNotSupported: c.config.Dis... | [
"func",
"(",
"c",
"*",
"Client",
")",
"openConn",
"(",
"idx",
"int",
",",
"host",
"string",
")",
"(",
"pconn",
"*",
"persistentConn",
",",
"err",
"error",
")",
"{",
"pconn",
"=",
"&",
"persistentConn",
"{",
"idx",
":",
"idx",
",",
"features",
":",
... | // Open and set up a control connection. | [
"Open",
"and",
"set",
"up",
"a",
"control",
"connection",
"."
] | 012609e90524f0bfde77100facdc47f807794c27 | https://github.com/secsy/goftp/blob/012609e90524f0bfde77100facdc47f807794c27/client.go#L359-L442 |
23,959 | secsy/goftp | persistent_connection.go | requestPassive | func (pconn *persistentConn) requestPassive() (string, error) {
var (
startIdx int
endIdx int
port int
remoteHost string
code int
msg string
err error
)
if pconn.epsvNotSupported {
goto PASV
}
// Extended PaSsiVe (same idea as PASV, but works with IPv6).
// See ht... | go | func (pconn *persistentConn) requestPassive() (string, error) {
var (
startIdx int
endIdx int
port int
remoteHost string
code int
msg string
err error
)
if pconn.epsvNotSupported {
goto PASV
}
// Extended PaSsiVe (same idea as PASV, but works with IPv6).
// See ht... | [
"func",
"(",
"pconn",
"*",
"persistentConn",
")",
"requestPassive",
"(",
")",
"(",
"string",
",",
"error",
")",
"{",
"var",
"(",
"startIdx",
"int",
"\n",
"endIdx",
"int",
"\n",
"port",
"int",
"\n",
"remoteHost",
"string",
"\n",
"code",
"int",
"\n",
"ms... | // Request that the server enters passive mode, allowing us to connect to it.
// This lets transfers work with the client behind NAT, so you almost always
// want it. First try EPSV, then fall back to PASV. | [
"Request",
"that",
"the",
"server",
"enters",
"passive",
"mode",
"allowing",
"us",
"to",
"connect",
"to",
"it",
".",
"This",
"lets",
"transfers",
"work",
"with",
"the",
"client",
"behind",
"NAT",
"so",
"you",
"almost",
"always",
"want",
"it",
".",
"First",... | 012609e90524f0bfde77100facdc47f807794c27 | https://github.com/secsy/goftp/blob/012609e90524f0bfde77100facdc47f807794c27/persistent_connection.go#L259-L349 |
23,960 | huin/goupnp | scpd/scpd.go | Clean | func (scpd *SCPD) Clean() {
cleanWhitespace(&scpd.ConfigId)
for i := range scpd.Actions {
scpd.Actions[i].clean()
}
for i := range scpd.StateVariables {
scpd.StateVariables[i].clean()
}
} | go | func (scpd *SCPD) Clean() {
cleanWhitespace(&scpd.ConfigId)
for i := range scpd.Actions {
scpd.Actions[i].clean()
}
for i := range scpd.StateVariables {
scpd.StateVariables[i].clean()
}
} | [
"func",
"(",
"scpd",
"*",
"SCPD",
")",
"Clean",
"(",
")",
"{",
"cleanWhitespace",
"(",
"&",
"scpd",
".",
"ConfigId",
")",
"\n",
"for",
"i",
":=",
"range",
"scpd",
".",
"Actions",
"{",
"scpd",
".",
"Actions",
"[",
"i",
"]",
".",
"clean",
"(",
")",... | // Clean attempts to remove stray whitespace etc. in the structure. It seems
// unfortunately common for stray whitespace to be present in SCPD documents,
// this method attempts to make it easy to clean them out. | [
"Clean",
"attempts",
"to",
"remove",
"stray",
"whitespace",
"etc",
".",
"in",
"the",
"structure",
".",
"It",
"seems",
"unfortunately",
"common",
"for",
"stray",
"whitespace",
"to",
"be",
"present",
"in",
"SCPD",
"documents",
"this",
"method",
"attempts",
"to",... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/scpd/scpd.go#L30-L38 |
23,961 | huin/goupnp | soap/types.go | MarshalFixed14_4 | func MarshalFixed14_4(v float64) (string, error) {
if v >= 1e14 || v <= -1e14 {
return "", fmt.Errorf("soap fixed14.4: value %v out of bounds", v)
}
return strconv.FormatFloat(v, 'f', 4, 64), nil
} | go | func MarshalFixed14_4(v float64) (string, error) {
if v >= 1e14 || v <= -1e14 {
return "", fmt.Errorf("soap fixed14.4: value %v out of bounds", v)
}
return strconv.FormatFloat(v, 'f', 4, 64), nil
} | [
"func",
"MarshalFixed14_4",
"(",
"v",
"float64",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"v",
">=",
"1e14",
"||",
"v",
"<=",
"-",
"1e14",
"{",
"return",
"\"",
"\"",
",",
"fmt",
".",
"Errorf",
"(",
"\"",
"\"",
",",
"v",
")",
"\n",
"}",... | // MarshalFixed14_4 marshals float64 to SOAP "fixed.14.4" type. | [
"MarshalFixed14_4",
"marshals",
"float64",
"to",
"SOAP",
"fixed",
".",
"14",
".",
"4",
"type",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L113-L118 |
23,962 | huin/goupnp | soap/types.go | UnmarshalFixed14_4 | func UnmarshalFixed14_4(s string) (float64, error) {
v, err := strconv.ParseFloat(s, 64)
if err != nil {
return 0, err
}
if v >= 1e14 || v <= -1e14 {
return 0, fmt.Errorf("soap fixed14.4: value %q out of bounds", s)
}
return v, nil
} | go | func UnmarshalFixed14_4(s string) (float64, error) {
v, err := strconv.ParseFloat(s, 64)
if err != nil {
return 0, err
}
if v >= 1e14 || v <= -1e14 {
return 0, fmt.Errorf("soap fixed14.4: value %q out of bounds", s)
}
return v, nil
} | [
"func",
"UnmarshalFixed14_4",
"(",
"s",
"string",
")",
"(",
"float64",
",",
"error",
")",
"{",
"v",
",",
"err",
":=",
"strconv",
".",
"ParseFloat",
"(",
"s",
",",
"64",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"0",
",",
"err",
"\n",
"}... | // UnmarshalFixed14_4 unmarshals float64 from SOAP "fixed.14.4" type. | [
"UnmarshalFixed14_4",
"unmarshals",
"float64",
"from",
"SOAP",
"fixed",
".",
"14",
".",
"4",
"type",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L121-L130 |
23,963 | huin/goupnp | soap/types.go | MarshalChar | func MarshalChar(v rune) (string, error) {
if v == 0 {
return "", errors.New("soap char: rune 0 is not allowed")
}
return string(v), nil
} | go | func MarshalChar(v rune) (string, error) {
if v == 0 {
return "", errors.New("soap char: rune 0 is not allowed")
}
return string(v), nil
} | [
"func",
"MarshalChar",
"(",
"v",
"rune",
")",
"(",
"string",
",",
"error",
")",
"{",
"if",
"v",
"==",
"0",
"{",
"return",
"\"",
"\"",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"return",
"string",
"(",
"v",
")",
",",
"n... | // MarshalChar marshals rune to SOAP "char" type. | [
"MarshalChar",
"marshals",
"rune",
"to",
"SOAP",
"char",
"type",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L133-L138 |
23,964 | huin/goupnp | soap/types.go | UnmarshalChar | func UnmarshalChar(s string) (rune, error) {
if len(s) == 0 {
return 0, errors.New("soap char: got empty string")
}
r, n := utf8.DecodeRune([]byte(s))
if n != len(s) {
return 0, fmt.Errorf("soap char: value %q is not a single rune", s)
}
return r, nil
} | go | func UnmarshalChar(s string) (rune, error) {
if len(s) == 0 {
return 0, errors.New("soap char: got empty string")
}
r, n := utf8.DecodeRune([]byte(s))
if n != len(s) {
return 0, fmt.Errorf("soap char: value %q is not a single rune", s)
}
return r, nil
} | [
"func",
"UnmarshalChar",
"(",
"s",
"string",
")",
"(",
"rune",
",",
"error",
")",
"{",
"if",
"len",
"(",
"s",
")",
"==",
"0",
"{",
"return",
"0",
",",
"errors",
".",
"New",
"(",
"\"",
"\"",
")",
"\n",
"}",
"\n",
"r",
",",
"n",
":=",
"utf8",
... | // UnmarshalChar unmarshals rune from SOAP "char" type. | [
"UnmarshalChar",
"unmarshals",
"rune",
"from",
"SOAP",
"char",
"type",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L141-L150 |
23,965 | huin/goupnp | soap/types.go | UnmarshalDate | func UnmarshalDate(s string) (time.Time, error) {
year, month, day, err := parseDateParts(s)
if err != nil {
return time.Time{}, err
}
return time.Date(year, time.Month(month), day, 0, 0, 0, 0, localLoc), nil
} | go | func UnmarshalDate(s string) (time.Time, error) {
year, month, day, err := parseDateParts(s)
if err != nil {
return time.Time{}, err
}
return time.Date(year, time.Month(month), day, 0, 0, 0, 0, localLoc), nil
} | [
"func",
"UnmarshalDate",
"(",
"s",
"string",
")",
"(",
"time",
".",
"Time",
",",
"error",
")",
"{",
"year",
",",
"month",
",",
"day",
",",
"err",
":=",
"parseDateParts",
"(",
"s",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"time",
".",
"... | // UnmarshalDate unmarshals time.Time from SOAP "date" type. This outputs the
// date as midnight in the local time zone. | [
"UnmarshalDate",
"unmarshals",
"time",
".",
"Time",
"from",
"SOAP",
"date",
"type",
".",
"This",
"outputs",
"the",
"date",
"as",
"midnight",
"in",
"the",
"local",
"time",
"zone",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L297-L303 |
23,966 | huin/goupnp | soap/types.go | MarshalTimeOfDay | func MarshalTimeOfDay(v TimeOfDay) (string, error) {
d := int64(v.FromMidnight / time.Second)
hour := d / 3600
d = d % 3600
minute := d / 60
second := d % 60
return fmt.Sprintf("%02d:%02d:%02d", hour, minute, second), nil
} | go | func MarshalTimeOfDay(v TimeOfDay) (string, error) {
d := int64(v.FromMidnight / time.Second)
hour := d / 3600
d = d % 3600
minute := d / 60
second := d % 60
return fmt.Sprintf("%02d:%02d:%02d", hour, minute, second), nil
} | [
"func",
"MarshalTimeOfDay",
"(",
"v",
"TimeOfDay",
")",
"(",
"string",
",",
"error",
")",
"{",
"d",
":=",
"int64",
"(",
"v",
".",
"FromMidnight",
"/",
"time",
".",
"Second",
")",
"\n",
"hour",
":=",
"d",
"/",
"3600",
"\n",
"d",
"=",
"d",
"%",
"36... | // MarshalTimeOfDay marshals TimeOfDay to the "time" type. | [
"MarshalTimeOfDay",
"marshals",
"TimeOfDay",
"to",
"the",
"time",
"type",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L321-L329 |
23,967 | huin/goupnp | soap/types.go | UnmarshalTimeOfDay | func UnmarshalTimeOfDay(s string) (TimeOfDay, error) {
t, err := UnmarshalTimeOfDayTz(s)
if err != nil {
return TimeOfDay{}, err
} else if t.HasOffset {
return TimeOfDay{}, fmt.Errorf("soap time: value %q contains unexpected timezone", s)
}
return t, nil
} | go | func UnmarshalTimeOfDay(s string) (TimeOfDay, error) {
t, err := UnmarshalTimeOfDayTz(s)
if err != nil {
return TimeOfDay{}, err
} else if t.HasOffset {
return TimeOfDay{}, fmt.Errorf("soap time: value %q contains unexpected timezone", s)
}
return t, nil
} | [
"func",
"UnmarshalTimeOfDay",
"(",
"s",
"string",
")",
"(",
"TimeOfDay",
",",
"error",
")",
"{",
"t",
",",
"err",
":=",
"UnmarshalTimeOfDayTz",
"(",
"s",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"TimeOfDay",
"{",
"}",
",",
"err",
"\n",
"}"... | // UnmarshalTimeOfDay unmarshals TimeOfDay from the "time" type. | [
"UnmarshalTimeOfDay",
"unmarshals",
"TimeOfDay",
"from",
"the",
"time",
"type",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L332-L340 |
23,968 | huin/goupnp | soap/types.go | MarshalTimeOfDayTz | func MarshalTimeOfDayTz(v TimeOfDay) (string, error) {
d := int64(v.FromMidnight / time.Second)
hour := d / 3600
d = d % 3600
minute := d / 60
second := d % 60
tz := ""
if v.HasOffset {
if v.Offset == 0 {
tz = "Z"
} else {
offsetMins := v.Offset / 60
sign := '+'
if offsetMins < 1 {
offsetMin... | go | func MarshalTimeOfDayTz(v TimeOfDay) (string, error) {
d := int64(v.FromMidnight / time.Second)
hour := d / 3600
d = d % 3600
minute := d / 60
second := d % 60
tz := ""
if v.HasOffset {
if v.Offset == 0 {
tz = "Z"
} else {
offsetMins := v.Offset / 60
sign := '+'
if offsetMins < 1 {
offsetMin... | [
"func",
"MarshalTimeOfDayTz",
"(",
"v",
"TimeOfDay",
")",
"(",
"string",
",",
"error",
")",
"{",
"d",
":=",
"int64",
"(",
"v",
".",
"FromMidnight",
"/",
"time",
".",
"Second",
")",
"\n",
"hour",
":=",
"d",
"/",
"3600",
"\n",
"d",
"=",
"d",
"%",
"... | // MarshalTimeOfDayTz marshals TimeOfDay to the "time.tz" type. | [
"MarshalTimeOfDayTz",
"marshals",
"TimeOfDay",
"to",
"the",
"time",
".",
"tz",
"type",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L343-L366 |
23,969 | huin/goupnp | soap/types.go | UnmarshalTimeOfDayTz | func UnmarshalTimeOfDayTz(s string) (tod TimeOfDay, err error) {
zoneIndex := strings.IndexAny(s, "Z+-")
var timePart string
var hasOffset bool
var offset int
if zoneIndex == -1 {
hasOffset = false
timePart = s
} else {
hasOffset = true
timePart = s[:zoneIndex]
if offset, err = parseTimezone(s[zoneIndex... | go | func UnmarshalTimeOfDayTz(s string) (tod TimeOfDay, err error) {
zoneIndex := strings.IndexAny(s, "Z+-")
var timePart string
var hasOffset bool
var offset int
if zoneIndex == -1 {
hasOffset = false
timePart = s
} else {
hasOffset = true
timePart = s[:zoneIndex]
if offset, err = parseTimezone(s[zoneIndex... | [
"func",
"UnmarshalTimeOfDayTz",
"(",
"s",
"string",
")",
"(",
"tod",
"TimeOfDay",
",",
"err",
"error",
")",
"{",
"zoneIndex",
":=",
"strings",
".",
"IndexAny",
"(",
"s",
",",
"\"",
"\"",
")",
"\n",
"var",
"timePart",
"string",
"\n",
"var",
"hasOffset",
... | // UnmarshalTimeOfDayTz unmarshals TimeOfDay from the "time.tz" type. | [
"UnmarshalTimeOfDayTz",
"unmarshals",
"TimeOfDay",
"from",
"the",
"time",
".",
"tz",
"type",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L369-L403 |
23,970 | huin/goupnp | soap/types.go | MarshalDateTime | func MarshalDateTime(v time.Time) (string, error) {
return v.In(localLoc).Format("2006-01-02T15:04:05"), nil
} | go | func MarshalDateTime(v time.Time) (string, error) {
return v.In(localLoc).Format("2006-01-02T15:04:05"), nil
} | [
"func",
"MarshalDateTime",
"(",
"v",
"time",
".",
"Time",
")",
"(",
"string",
",",
"error",
")",
"{",
"return",
"v",
".",
"In",
"(",
"localLoc",
")",
".",
"Format",
"(",
"\"",
"\"",
")",
",",
"nil",
"\n",
"}"
] | // MarshalDateTime marshals time.Time to SOAP "dateTime" type. Note that this
// converts to local time. | [
"MarshalDateTime",
"marshals",
"time",
".",
"Time",
"to",
"SOAP",
"dateTime",
"type",
".",
"Note",
"that",
"this",
"converts",
"to",
"local",
"time",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L407-L409 |
23,971 | huin/goupnp | soap/types.go | UnmarshalDateTime | func UnmarshalDateTime(s string) (result time.Time, err error) {
dateStr, timeStr, zoneStr, err := splitCompleteDateTimeZone(s)
if err != nil {
return
}
if len(zoneStr) != 0 {
err = fmt.Errorf("soap datetime: unexpected timezone in %q", s)
return
}
year, month, day, err := parseDateParts(dateStr)
if err ... | go | func UnmarshalDateTime(s string) (result time.Time, err error) {
dateStr, timeStr, zoneStr, err := splitCompleteDateTimeZone(s)
if err != nil {
return
}
if len(zoneStr) != 0 {
err = fmt.Errorf("soap datetime: unexpected timezone in %q", s)
return
}
year, month, day, err := parseDateParts(dateStr)
if err ... | [
"func",
"UnmarshalDateTime",
"(",
"s",
"string",
")",
"(",
"result",
"time",
".",
"Time",
",",
"err",
"error",
")",
"{",
"dateStr",
",",
"timeStr",
",",
"zoneStr",
",",
"err",
":=",
"splitCompleteDateTimeZone",
"(",
"s",
")",
"\n",
"if",
"err",
"!=",
"... | // UnmarshalDateTime unmarshals time.Time from the SOAP "dateTime" type. This
// returns a value in the local timezone. | [
"UnmarshalDateTime",
"unmarshals",
"time",
".",
"Time",
"from",
"the",
"SOAP",
"dateTime",
"type",
".",
"This",
"returns",
"a",
"value",
"in",
"the",
"local",
"timezone",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L413-L439 |
23,972 | huin/goupnp | soap/types.go | UnmarshalDateTimeTz | func UnmarshalDateTimeTz(s string) (result time.Time, err error) {
dateStr, timeStr, zoneStr, err := splitCompleteDateTimeZone(s)
if err != nil {
return
}
year, month, day, err := parseDateParts(dateStr)
if err != nil {
return
}
var hour, minute, second int
var location *time.Location = localLoc
if len(t... | go | func UnmarshalDateTimeTz(s string) (result time.Time, err error) {
dateStr, timeStr, zoneStr, err := splitCompleteDateTimeZone(s)
if err != nil {
return
}
year, month, day, err := parseDateParts(dateStr)
if err != nil {
return
}
var hour, minute, second int
var location *time.Location = localLoc
if len(t... | [
"func",
"UnmarshalDateTimeTz",
"(",
"s",
"string",
")",
"(",
"result",
"time",
".",
"Time",
",",
"err",
"error",
")",
"{",
"dateStr",
",",
"timeStr",
",",
"zoneStr",
",",
"err",
":=",
"splitCompleteDateTimeZone",
"(",
"s",
")",
"\n",
"if",
"err",
"!=",
... | // UnmarshalDateTimeTz unmarshals time.Time from the SOAP "dateTime.tz" type.
// This returns a value in the local timezone when the timezone is unspecified. | [
"UnmarshalDateTimeTz",
"unmarshals",
"time",
".",
"Time",
"from",
"the",
"SOAP",
"dateTime",
".",
"tz",
"type",
".",
"This",
"returns",
"a",
"value",
"in",
"the",
"local",
"timezone",
"when",
"the",
"timezone",
"is",
"unspecified",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L448-L479 |
23,973 | huin/goupnp | soap/types.go | UnmarshalBoolean | func UnmarshalBoolean(s string) (bool, error) {
switch s {
case "0", "false", "no":
return false, nil
case "1", "true", "yes":
return true, nil
}
return false, fmt.Errorf("soap boolean: %q is not a valid boolean value", s)
} | go | func UnmarshalBoolean(s string) (bool, error) {
switch s {
case "0", "false", "no":
return false, nil
case "1", "true", "yes":
return true, nil
}
return false, fmt.Errorf("soap boolean: %q is not a valid boolean value", s)
} | [
"func",
"UnmarshalBoolean",
"(",
"s",
"string",
")",
"(",
"bool",
",",
"error",
")",
"{",
"switch",
"s",
"{",
"case",
"\"",
"\"",
",",
"\"",
"\"",
",",
"\"",
"\"",
":",
"return",
"false",
",",
"nil",
"\n",
"case",
"\"",
"\"",
",",
"\"",
"\"",
"... | // UnmarshalBoolean unmarshals bool from the SOAP "boolean" type. | [
"UnmarshalBoolean",
"unmarshals",
"bool",
"from",
"the",
"SOAP",
"boolean",
"type",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/types.go#L490-L498 |
23,974 | huin/goupnp | soap/soap.go | encodeRequestAction | func encodeRequestAction(actionNamespace, actionName string, inAction interface{}) ([]byte, error) {
requestBuf := new(bytes.Buffer)
requestBuf.WriteString(soapPrefix)
requestBuf.WriteString(`<u:`)
xml.EscapeText(requestBuf, []byte(actionName))
requestBuf.WriteString(` xmlns:u="`)
xml.EscapeText(requestBuf, []byt... | go | func encodeRequestAction(actionNamespace, actionName string, inAction interface{}) ([]byte, error) {
requestBuf := new(bytes.Buffer)
requestBuf.WriteString(soapPrefix)
requestBuf.WriteString(`<u:`)
xml.EscapeText(requestBuf, []byte(actionName))
requestBuf.WriteString(` xmlns:u="`)
xml.EscapeText(requestBuf, []byt... | [
"func",
"encodeRequestAction",
"(",
"actionNamespace",
",",
"actionName",
"string",
",",
"inAction",
"interface",
"{",
"}",
")",
"(",
"[",
"]",
"byte",
",",
"error",
")",
"{",
"requestBuf",
":=",
"new",
"(",
"bytes",
".",
"Buffer",
")",
"\n",
"requestBuf",... | // encodeRequestAction is a hacky way to create an encoded SOAP envelope
// containing the given action. Experiments with one router have shown that it
// 500s for requests where the outer default xmlns is set to the SOAP
// namespace, and then reassigning the default namespace within that to the
// service namespace. ... | [
"encodeRequestAction",
"is",
"a",
"hacky",
"way",
"to",
"create",
"an",
"encoded",
"SOAP",
"envelope",
"containing",
"the",
"given",
"action",
".",
"Experiments",
"with",
"one",
"router",
"have",
"shown",
"that",
"it",
"500s",
"for",
"requests",
"where",
"the"... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/soap/soap.go#L92-L110 |
23,975 | huin/goupnp | httpu/httpu.go | NewHTTPUClient | func NewHTTPUClient() (*HTTPUClient, error) {
conn, err := net.ListenPacket("udp", ":0")
if err != nil {
return nil, err
}
return &HTTPUClient{conn: conn}, nil
} | go | func NewHTTPUClient() (*HTTPUClient, error) {
conn, err := net.ListenPacket("udp", ":0")
if err != nil {
return nil, err
}
return &HTTPUClient{conn: conn}, nil
} | [
"func",
"NewHTTPUClient",
"(",
")",
"(",
"*",
"HTTPUClient",
",",
"error",
")",
"{",
"conn",
",",
"err",
":=",
"net",
".",
"ListenPacket",
"(",
"\"",
"\"",
",",
"\"",
"\"",
")",
"\n",
"if",
"err",
"!=",
"nil",
"{",
"return",
"nil",
",",
"err",
"\... | // NewHTTPUClient creates a new HTTPUClient, opening up a new UDP socket for the
// purpose. | [
"NewHTTPUClient",
"creates",
"a",
"new",
"HTTPUClient",
"opening",
"up",
"a",
"new",
"UDP",
"socket",
"for",
"the",
"purpose",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/httpu/httpu.go#L24-L30 |
23,976 | huin/goupnp | httpu/httpu.go | NewHTTPUClientAddr | func NewHTTPUClientAddr(addr string) (*HTTPUClient, error) {
ip := net.ParseIP(addr)
if ip == nil {
return nil, errors.New("Invalid listening address")
}
conn, err := net.ListenPacket("udp", ip.String()+":0")
if err != nil {
return nil, err
}
return &HTTPUClient{conn: conn}, nil
} | go | func NewHTTPUClientAddr(addr string) (*HTTPUClient, error) {
ip := net.ParseIP(addr)
if ip == nil {
return nil, errors.New("Invalid listening address")
}
conn, err := net.ListenPacket("udp", ip.String()+":0")
if err != nil {
return nil, err
}
return &HTTPUClient{conn: conn}, nil
} | [
"func",
"NewHTTPUClientAddr",
"(",
"addr",
"string",
")",
"(",
"*",
"HTTPUClient",
",",
"error",
")",
"{",
"ip",
":=",
"net",
".",
"ParseIP",
"(",
"addr",
")",
"\n",
"if",
"ip",
"==",
"nil",
"{",
"return",
"nil",
",",
"errors",
".",
"New",
"(",
"\"... | // NewHTTPUClientAddr creates a new HTTPUClient which will broadcast packets
// from the specified address, opening up a new UDP socket for the purpose | [
"NewHTTPUClientAddr",
"creates",
"a",
"new",
"HTTPUClient",
"which",
"will",
"broadcast",
"packets",
"from",
"the",
"specified",
"address",
"opening",
"up",
"a",
"new",
"UDP",
"socket",
"for",
"the",
"purpose"
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/httpu/httpu.go#L34-L44 |
23,977 | huin/goupnp | httpu/httpu.go | Close | func (httpu *HTTPUClient) Close() error {
httpu.connLock.Lock()
defer httpu.connLock.Unlock()
return httpu.conn.Close()
} | go | func (httpu *HTTPUClient) Close() error {
httpu.connLock.Lock()
defer httpu.connLock.Unlock()
return httpu.conn.Close()
} | [
"func",
"(",
"httpu",
"*",
"HTTPUClient",
")",
"Close",
"(",
")",
"error",
"{",
"httpu",
".",
"connLock",
".",
"Lock",
"(",
")",
"\n",
"defer",
"httpu",
".",
"connLock",
".",
"Unlock",
"(",
")",
"\n",
"return",
"httpu",
".",
"conn",
".",
"Close",
"... | // Close shuts down the client. The client will no longer be useful following
// this. | [
"Close",
"shuts",
"down",
"the",
"client",
".",
"The",
"client",
"will",
"no",
"longer",
"be",
"useful",
"following",
"this",
"."
] | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/httpu/httpu.go#L48-L52 |
23,978 | huin/goupnp | httpu/httpu.go | Do | func (httpu *HTTPUClient) Do(req *http.Request, timeout time.Duration, numSends int) ([]*http.Response, error) {
httpu.connLock.Lock()
defer httpu.connLock.Unlock()
// Create the request. This is a subset of what http.Request.Write does
// deliberately to avoid creating extra fields which may confuse some
// devi... | go | func (httpu *HTTPUClient) Do(req *http.Request, timeout time.Duration, numSends int) ([]*http.Response, error) {
httpu.connLock.Lock()
defer httpu.connLock.Unlock()
// Create the request. This is a subset of what http.Request.Write does
// deliberately to avoid creating extra fields which may confuse some
// devi... | [
"func",
"(",
"httpu",
"*",
"HTTPUClient",
")",
"Do",
"(",
"req",
"*",
"http",
".",
"Request",
",",
"timeout",
"time",
".",
"Duration",
",",
"numSends",
"int",
")",
"(",
"[",
"]",
"*",
"http",
".",
"Response",
",",
"error",
")",
"{",
"httpu",
".",
... | // Do performs a request. The timeout is how long to wait for before returning
// the responses that were received. An error is only returned for failing to
// send the request. Failures in receipt simply do not add to the resulting
// responses.
//
// Note that at present only one concurrent connection will happen per... | [
"Do",
"performs",
"a",
"request",
".",
"The",
"timeout",
"is",
"how",
"long",
"to",
"wait",
"for",
"before",
"returning",
"the",
"responses",
"that",
"were",
"received",
".",
"An",
"error",
"is",
"only",
"returned",
"for",
"failing",
"to",
"send",
"the",
... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/httpu/httpu.go#L61-L134 |
23,979 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewDeviceProtection1Clients | func NewDeviceProtection1Clients() (clients []*DeviceProtection1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_DeviceProtection_1); err != nil {
return
}
clients = newDeviceProtection1ClientsFromGenericClients(genericClients)
... | go | func NewDeviceProtection1Clients() (clients []*DeviceProtection1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_DeviceProtection_1); err != nil {
return
}
clients = newDeviceProtection1ClientsFromGenericClients(genericClients)
... | [
"func",
"NewDeviceProtection1Clients",
"(",
")",
"(",
"clients",
"[",
"]",
"*",
"DeviceProtection1",
",",
"errors",
"[",
"]",
"error",
",",
"err",
"error",
")",
"{",
"var",
"genericClients",
"[",
"]",
"goupnp",
".",
"ServiceClient",
"\n",
"if",
"genericClien... | // NewDeviceProtection1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry call... | [
"NewDeviceProtection1Clients",
"discovers",
"instances",
"of",
"the",
"service",
"on",
"the",
"network",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"errors",
"will",
"contain",
"an",
"error",
"for",
"any",
"devices",
"that",
"replied"... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L61-L68 |
23,980 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewDeviceProtection1ClientsByURL | func NewDeviceProtection1ClientsByURL(loc *url.URL) ([]*DeviceProtection1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_DeviceProtection_1)
if err != nil {
return nil, err
}
return newDeviceProtection1ClientsFromGenericClients(genericClients), nil
} | go | func NewDeviceProtection1ClientsByURL(loc *url.URL) ([]*DeviceProtection1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_DeviceProtection_1)
if err != nil {
return nil, err
}
return newDeviceProtection1ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewDeviceProtection1ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"DeviceProtection1",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
"URN_DeviceProte... | // NewDeviceProtection1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service URL. | [
"NewDeviceProtection1ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error",
"pro... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L76-L82 |
23,981 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewLANHostConfigManagement1Clients | func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil {
return
}
clients = newLANHostConfigManagement1ClientsFromGen... | go | func NewLANHostConfigManagement1Clients() (clients []*LANHostConfigManagement1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_LANHostConfigManagement_1); err != nil {
return
}
clients = newLANHostConfigManagement1ClientsFromGen... | [
"func",
"NewLANHostConfigManagement1Clients",
"(",
")",
"(",
"clients",
"[",
"]",
"*",
"LANHostConfigManagement1",
",",
"errors",
"[",
"]",
"error",
",",
"err",
"error",
")",
"{",
"var",
"genericClients",
"[",
"]",
"goupnp",
".",
"ServiceClient",
"\n",
"if",
... | // NewLANHostConfigManagement1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical ent... | [
"NewLANHostConfigManagement1Clients",
"discovers",
"instances",
"of",
"the",
"service",
"on",
"the",
"network",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"errors",
"will",
"contain",
"an",
"error",
"for",
"any",
"devices",
"that",
"r... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L526-L533 |
23,982 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewLANHostConfigManagement1ClientsByURL | func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_LANHostConfigManagement_1)
if err != nil {
return nil, err
}
return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
} | go | func NewLANHostConfigManagement1ClientsByURL(loc *url.URL) ([]*LANHostConfigManagement1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_LANHostConfigManagement_1)
if err != nil {
return nil, err
}
return newLANHostConfigManagement1ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewLANHostConfigManagement1ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"LANHostConfigManagement1",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
"U... | // NewLANHostConfigManagement1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service ... | [
"NewLANHostConfigManagement1ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error",... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L541-L547 |
23,983 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewLayer3Forwarding1Clients | func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil {
return
}
clients = newLayer3Forwarding1ClientsFromGenericClients(genericClients)
... | go | func NewLayer3Forwarding1Clients() (clients []*Layer3Forwarding1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_Layer3Forwarding_1); err != nil {
return
}
clients = newLayer3Forwarding1ClientsFromGenericClients(genericClients)
... | [
"func",
"NewLayer3Forwarding1Clients",
"(",
")",
"(",
"clients",
"[",
"]",
"*",
"Layer3Forwarding1",
",",
"errors",
"[",
"]",
"error",
",",
"err",
"error",
")",
"{",
"var",
"genericClients",
"[",
"]",
"goupnp",
".",
"ServiceClient",
"\n",
"if",
"genericClien... | // NewLayer3Forwarding1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry call... | [
"NewLayer3Forwarding1Clients",
"discovers",
"instances",
"of",
"the",
"service",
"on",
"the",
"network",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"errors",
"will",
"contain",
"an",
"error",
"for",
"any",
"devices",
"that",
"replied"... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L1088-L1095 |
23,984 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewLayer3Forwarding1ClientsByURL | func NewLayer3Forwarding1ClientsByURL(loc *url.URL) ([]*Layer3Forwarding1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_Layer3Forwarding_1)
if err != nil {
return nil, err
}
return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil
} | go | func NewLayer3Forwarding1ClientsByURL(loc *url.URL) ([]*Layer3Forwarding1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_Layer3Forwarding_1)
if err != nil {
return nil, err
}
return newLayer3Forwarding1ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewLayer3Forwarding1ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"Layer3Forwarding1",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
"URN_Layer3Forwa... | // NewLayer3Forwarding1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service URL. | [
"NewLayer3Forwarding1ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error",
"pro... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L1103-L1109 |
23,985 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANCableLinkConfig1Clients | func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil {
return
}
clients = newWANCableLinkConfig1ClientsFromGenericClients(genericC... | go | func NewWANCableLinkConfig1Clients() (clients []*WANCableLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCableLinkConfig_1); err != nil {
return
}
clients = newWANCableLinkConfig1ClientsFromGenericClients(genericC... | [
"func",
"NewWANCableLinkConfig1Clients",
"(",
")",
"(",
"clients",
"[",
"]",
"*",
"WANCableLinkConfig1",
",",
"errors",
"[",
"]",
"error",
",",
"err",
"error",
")",
"{",
"var",
"genericClients",
"[",
"]",
"goupnp",
".",
"ServiceClient",
"\n",
"if",
"genericC... | // NewWANCableLinkConfig1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry ca... | [
"NewWANCableLinkConfig1Clients",
"discovers",
"instances",
"of",
"the",
"service",
"on",
"the",
"network",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"errors",
"will",
"contain",
"an",
"error",
"for",
"any",
"devices",
"that",
"replie... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L1200-L1207 |
23,986 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANCableLinkConfig1ClientsByURL | func NewWANCableLinkConfig1ClientsByURL(loc *url.URL) ([]*WANCableLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCableLinkConfig_1)
if err != nil {
return nil, err
}
return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil
} | go | func NewWANCableLinkConfig1ClientsByURL(loc *url.URL) ([]*WANCableLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCableLinkConfig_1)
if err != nil {
return nil, err
}
return newWANCableLinkConfig1ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewWANCableLinkConfig1ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"WANCableLinkConfig1",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
"URN_WANCabl... | // NewWANCableLinkConfig1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service URL. | [
"NewWANCableLinkConfig1ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error",
"p... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L1215-L1221 |
23,987 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANCommonInterfaceConfig1Clients | func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil {
return
}
clients = newWANCommonInterfaceConfig1ClientsFro... | go | func NewWANCommonInterfaceConfig1Clients() (clients []*WANCommonInterfaceConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANCommonInterfaceConfig_1); err != nil {
return
}
clients = newWANCommonInterfaceConfig1ClientsFro... | [
"func",
"NewWANCommonInterfaceConfig1Clients",
"(",
")",
"(",
"clients",
"[",
"]",
"*",
"WANCommonInterfaceConfig1",
",",
"errors",
"[",
"]",
"error",
",",
"err",
"error",
")",
"{",
"var",
"genericClients",
"[",
"]",
"goupnp",
".",
"ServiceClient",
"\n",
"if",... | // NewWANCommonInterfaceConfig1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical en... | [
"NewWANCommonInterfaceConfig1Clients",
"discovers",
"instances",
"of",
"the",
"service",
"on",
"the",
"network",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"errors",
"will",
"contain",
"an",
"error",
"for",
"any",
"devices",
"that",
"... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L1538-L1545 |
23,988 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANCommonInterfaceConfig1ClientsByURL | func NewWANCommonInterfaceConfig1ClientsByURL(loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCommonInterfaceConfig_1)
if err != nil {
return nil, err
}
return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil
} | go | func NewWANCommonInterfaceConfig1ClientsByURL(loc *url.URL) ([]*WANCommonInterfaceConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANCommonInterfaceConfig_1)
if err != nil {
return nil, err
}
return newWANCommonInterfaceConfig1ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewWANCommonInterfaceConfig1ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"WANCommonInterfaceConfig1",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
... | // NewWANCommonInterfaceConfig1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service... | [
"NewWANCommonInterfaceConfig1ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error"... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L1553-L1559 |
23,989 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANDSLLinkConfig1Clients | func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil {
return
}
clients = newWANDSLLinkConfig1ClientsFromGenericClients(genericClients)
... | go | func NewWANDSLLinkConfig1Clients() (clients []*WANDSLLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANDSLLinkConfig_1); err != nil {
return
}
clients = newWANDSLLinkConfig1ClientsFromGenericClients(genericClients)
... | [
"func",
"NewWANDSLLinkConfig1Clients",
"(",
")",
"(",
"clients",
"[",
"]",
"*",
"WANDSLLinkConfig1",
",",
"errors",
"[",
"]",
"error",
",",
"err",
"error",
")",
"{",
"var",
"genericClients",
"[",
"]",
"goupnp",
".",
"ServiceClient",
"\n",
"if",
"genericClien... | // NewWANDSLLinkConfig1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry call... | [
"NewWANDSLLinkConfig1Clients",
"discovers",
"instances",
"of",
"the",
"service",
"on",
"the",
"network",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"errors",
"will",
"contain",
"an",
"error",
"for",
"any",
"devices",
"that",
"replied"... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L1889-L1896 |
23,990 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANDSLLinkConfig1ClientsByURL | func NewWANDSLLinkConfig1ClientsByURL(loc *url.URL) ([]*WANDSLLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANDSLLinkConfig_1)
if err != nil {
return nil, err
}
return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil
} | go | func NewWANDSLLinkConfig1ClientsByURL(loc *url.URL) ([]*WANDSLLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANDSLLinkConfig_1)
if err != nil {
return nil, err
}
return newWANDSLLinkConfig1ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewWANDSLLinkConfig1ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"WANDSLLinkConfig1",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
"URN_WANDSLLinkC... | // NewWANDSLLinkConfig1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service URL. | [
"NewWANDSLLinkConfig1ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error",
"pro... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L1904-L1910 |
23,991 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANEthernetLinkConfig1Clients | func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil {
return
}
clients = newWANEthernetLinkConfig1ClientsFromGenericClie... | go | func NewWANEthernetLinkConfig1Clients() (clients []*WANEthernetLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANEthernetLinkConfig_1); err != nil {
return
}
clients = newWANEthernetLinkConfig1ClientsFromGenericClie... | [
"func",
"NewWANEthernetLinkConfig1Clients",
"(",
")",
"(",
"clients",
"[",
"]",
"*",
"WANEthernetLinkConfig1",
",",
"errors",
"[",
"]",
"error",
",",
"err",
"error",
")",
"{",
"var",
"genericClients",
"[",
"]",
"goupnp",
".",
"ServiceClient",
"\n",
"if",
"ge... | // NewWANEthernetLinkConfig1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry... | [
"NewWANEthernetLinkConfig1Clients",
"discovers",
"instances",
"of",
"the",
"service",
"on",
"the",
"network",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"errors",
"will",
"contain",
"an",
"error",
"for",
"any",
"devices",
"that",
"rep... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L2217-L2224 |
23,992 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANEthernetLinkConfig1ClientsByURL | func NewWANEthernetLinkConfig1ClientsByURL(loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANEthernetLinkConfig_1)
if err != nil {
return nil, err
}
return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil
} | go | func NewWANEthernetLinkConfig1ClientsByURL(loc *url.URL) ([]*WANEthernetLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANEthernetLinkConfig_1)
if err != nil {
return nil, err
}
return newWANEthernetLinkConfig1ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewWANEthernetLinkConfig1ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"WANEthernetLinkConfig1",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
"URN_W... | // NewWANEthernetLinkConfig1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service UR... | [
"NewWANEthernetLinkConfig1ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error",
... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L2232-L2238 |
23,993 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANIPConnection1ClientsByURL | func NewWANIPConnection1ClientsByURL(loc *url.URL) ([]*WANIPConnection1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_1)
if err != nil {
return nil, err
}
return newWANIPConnection1ClientsFromGenericClients(genericClients), nil
} | go | func NewWANIPConnection1ClientsByURL(loc *url.URL) ([]*WANIPConnection1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_1)
if err != nil {
return nil, err
}
return newWANIPConnection1ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewWANIPConnection1ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"WANIPConnection1",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
"URN_WANIPConnecti... | // NewWANIPConnection1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service URL. | [
"NewWANIPConnection1ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error",
"prob... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L2322-L2328 |
23,994 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANIPConnection2Clients | func NewWANIPConnection2Clients() (clients []*WANIPConnection2, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_2); err != nil {
return
}
clients = newWANIPConnection2ClientsFromGenericClients(genericClients)
ret... | go | func NewWANIPConnection2Clients() (clients []*WANIPConnection2, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPConnection_2); err != nil {
return
}
clients = newWANIPConnection2ClientsFromGenericClients(genericClients)
ret... | [
"func",
"NewWANIPConnection2Clients",
"(",
")",
"(",
"clients",
"[",
"]",
"*",
"WANIPConnection2",
",",
"errors",
"[",
"]",
"error",
",",
"err",
"error",
")",
"{",
"var",
"genericClients",
"[",
"]",
"goupnp",
".",
"ServiceClient",
"\n",
"if",
"genericClients... | // NewWANIPConnection2Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry calli... | [
"NewWANIPConnection2Clients",
"discovers",
"instances",
"of",
"the",
"service",
"on",
"the",
"network",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"errors",
"will",
"contain",
"an",
"error",
"for",
"any",
"devices",
"that",
"replied",... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L2963-L2970 |
23,995 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANIPConnection2ClientsByURL | func NewWANIPConnection2ClientsByURL(loc *url.URL) ([]*WANIPConnection2, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_2)
if err != nil {
return nil, err
}
return newWANIPConnection2ClientsFromGenericClients(genericClients), nil
} | go | func NewWANIPConnection2ClientsByURL(loc *url.URL) ([]*WANIPConnection2, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPConnection_2)
if err != nil {
return nil, err
}
return newWANIPConnection2ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewWANIPConnection2ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"WANIPConnection2",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
"URN_WANIPConnecti... | // NewWANIPConnection2ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service URL. | [
"NewWANIPConnection2ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error",
"prob... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L2978-L2984 |
23,996 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANIPv6FirewallControl1Clients | func NewWANIPv6FirewallControl1Clients() (clients []*WANIPv6FirewallControl1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPv6FirewallControl_1); err != nil {
return
}
clients = newWANIPv6FirewallControl1ClientsFromGeneric... | go | func NewWANIPv6FirewallControl1Clients() (clients []*WANIPv6FirewallControl1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANIPv6FirewallControl_1); err != nil {
return
}
clients = newWANIPv6FirewallControl1ClientsFromGeneric... | [
"func",
"NewWANIPv6FirewallControl1Clients",
"(",
")",
"(",
"clients",
"[",
"]",
"*",
"WANIPv6FirewallControl1",
",",
"errors",
"[",
"]",
"error",
",",
"err",
"error",
")",
"{",
"var",
"genericClients",
"[",
"]",
"goupnp",
".",
"ServiceClient",
"\n",
"if",
"... | // NewWANIPv6FirewallControl1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entr... | [
"NewWANIPv6FirewallControl1Clients",
"discovers",
"instances",
"of",
"the",
"service",
"on",
"the",
"network",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"errors",
"will",
"contain",
"an",
"error",
"for",
"any",
"devices",
"that",
"re... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L3774-L3781 |
23,997 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANIPv6FirewallControl1ClientsByURL | func NewWANIPv6FirewallControl1ClientsByURL(loc *url.URL) ([]*WANIPv6FirewallControl1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPv6FirewallControl_1)
if err != nil {
return nil, err
}
return newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients), nil
} | go | func NewWANIPv6FirewallControl1ClientsByURL(loc *url.URL) ([]*WANIPv6FirewallControl1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANIPv6FirewallControl_1)
if err != nil {
return nil, err
}
return newWANIPv6FirewallControl1ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewWANIPv6FirewallControl1ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"WANIPv6FirewallControl1",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
"URN... | // NewWANIPv6FirewallControl1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service U... | [
"NewWANIPv6FirewallControl1ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error",
... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L3789-L3795 |
23,998 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANPOTSLinkConfig1Clients | func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil {
return
}
clients = newWANPOTSLinkConfig1ClientsFromGenericClients(genericClien... | go | func NewWANPOTSLinkConfig1Clients() (clients []*WANPOTSLinkConfig1, errors []error, err error) {
var genericClients []goupnp.ServiceClient
if genericClients, errors, err = goupnp.NewServiceClients(URN_WANPOTSLinkConfig_1); err != nil {
return
}
clients = newWANPOTSLinkConfig1ClientsFromGenericClients(genericClien... | [
"func",
"NewWANPOTSLinkConfig1Clients",
"(",
")",
"(",
"clients",
"[",
"]",
"*",
"WANPOTSLinkConfig1",
",",
"errors",
"[",
"]",
"error",
",",
"err",
"error",
")",
"{",
"var",
"genericClients",
"[",
"]",
"goupnp",
".",
"ServiceClient",
"\n",
"if",
"genericCli... | // NewWANPOTSLinkConfig1Clients discovers instances of the service on the network,
// and returns clients to any that are found. errors will contain an error for
// any devices that replied but which could not be queried, and err will be set
// if the discovery process failed outright.
//
// This is a typical entry cal... | [
"NewWANPOTSLinkConfig1Clients",
"discovers",
"instances",
"of",
"the",
"service",
"on",
"the",
"network",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"errors",
"will",
"contain",
"an",
"error",
"for",
"any",
"devices",
"that",
"replied... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L4090-L4097 |
23,999 | huin/goupnp | dcps/internetgateway2/internetgateway2.go | NewWANPOTSLinkConfig1ClientsByURL | func NewWANPOTSLinkConfig1ClientsByURL(loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPOTSLinkConfig_1)
if err != nil {
return nil, err
}
return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil
} | go | func NewWANPOTSLinkConfig1ClientsByURL(loc *url.URL) ([]*WANPOTSLinkConfig1, error) {
genericClients, err := goupnp.NewServiceClientsByURL(loc, URN_WANPOTSLinkConfig_1)
if err != nil {
return nil, err
}
return newWANPOTSLinkConfig1ClientsFromGenericClients(genericClients), nil
} | [
"func",
"NewWANPOTSLinkConfig1ClientsByURL",
"(",
"loc",
"*",
"url",
".",
"URL",
")",
"(",
"[",
"]",
"*",
"WANPOTSLinkConfig1",
",",
"error",
")",
"{",
"genericClients",
",",
"err",
":=",
"goupnp",
".",
"NewServiceClientsByURL",
"(",
"loc",
",",
"URN_WANPOTSLi... | // NewWANPOTSLinkConfig1ClientsByURL discovers instances of the service at the given
// URL, and returns clients to any that are found. An error is returned if
// there was an error probing the service.
//
// This is a typical entry calling point into this package when reusing an
// previously discovered service URL. | [
"NewWANPOTSLinkConfig1ClientsByURL",
"discovers",
"instances",
"of",
"the",
"service",
"at",
"the",
"given",
"URL",
"and",
"returns",
"clients",
"to",
"any",
"that",
"are",
"found",
".",
"An",
"error",
"is",
"returned",
"if",
"there",
"was",
"an",
"error",
"pr... | 656e61dfadd241c7cbdd22a023fa81ecb6860ea8 | https://github.com/huin/goupnp/blob/656e61dfadd241c7cbdd22a023fa81ecb6860ea8/dcps/internetgateway2/internetgateway2.go#L4105-L4111 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.