-
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.
Major refactor and add s3 bucket support
- Loading branch information
1 parent
3c4854c
commit 55a13ba
Showing
30 changed files
with
584 additions
and
77 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
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
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,24 @@ | ||
package mapper | ||
|
||
import ( | ||
"io" | ||
) | ||
|
||
// PutTagFn is used to specify the function structure to pass to the Retag method | ||
type PutTagFn func(*string, []*TagItem) error | ||
|
||
// Iface has been created for testing purposes. It allows to create mocks | ||
// when testing class that depend on the mapper | ||
type Iface interface { | ||
LoadConfig(io.Reader) error | ||
StripDefaults(*map[string]string) | ||
GetMissingDefaults(*map[string]string) *map[string]string | ||
GetFromTags(*map[string]string) (*map[string]string, error) | ||
GetFromKey(string, *map[string]string) (*map[string]string, error) | ||
ValidateTag(string, string) (*TagItem, error) | ||
MergeMaps(*map[string]string, *map[string]string) | ||
|
||
Retag(*string, *map[string]string, []string, PutTagFn) | ||
} | ||
|
||
var _ Iface = (*Mapper)(nil) |
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
Oops, something went wrong.