-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #125 from Edgio/DEN-323_Originv3Docs
[DEN-323] Originv3 Docs
- Loading branch information
Showing
6 changed files
with
215 additions
and
100 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
// Copyright 2022 Edgecast Inc., Licensed under the terms of the Apache 2.0 | ||
// license. See LICENSE file in project root for terms. | ||
package originv3 | ||
|
||
// SetShieldPOPsFromEdgeNodes is a convenience function for setting a group's | ||
// Shield POPs from a slice of OriginShieldEdgeNodes. | ||
func (g CustomerOriginGroupHTTPRequest) SetShieldPOPsFromEdgeNodes( | ||
edgeNodes []OriginShieldEdgeNode, | ||
) { | ||
shieldPOPs := make([]*string, 0) | ||
|
||
for _, n := range edgeNodes { | ||
for _, p := range n.Pops { | ||
shieldPOPs = append(shieldPOPs, p.Code) | ||
} | ||
} | ||
|
||
g.ShieldPops = shieldPOPs | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.