Documentation ¶
Index ¶
- func ArrangeParameters(args []string) []string
- func CacheHit(id *string) bool
- func CacheMiss(id *string) bool
- func CommandLine(args []string) *string
- func DiscriminatedCommand(service *string, action *string) bool
- func GetLocationData(contentId *string) *string
- func GetLocationMetaData(contentId *string) *string
- func HashValue(commandLine *string) *string
- func ReadContent(id *string) (*string, error)
- func ReadContentUpdate(id *string) (*string, error)
- func SpaceStringsBuilder(str string) string
- func UpdateMetaData(md *CacheEntry) error
- func WriteContent(id *string, content *string) error
- func WriteMetadata(md *CacheEntry) error
- type ApiCallProvider
- type ApiCallProviderName
- type CacheEntry
- type Parameters
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ArrangeParameters ¶ added in v0.1.4
ArrangeParameters if args contains "--profile" and "profilename", put them at the end so optimizer can regognize it
func CommandLine ¶ added in v0.1.6
func DiscriminatedCommand ¶
DiscriminatedCommand check whether a command is cachable
func GetLocationData ¶
func GetLocationMetaData ¶
func ReadContent ¶
func ReadContentUpdate ¶ added in v0.1.6
func SpaceStringsBuilder ¶
func UpdateMetaData ¶
func UpdateMetaData(md *CacheEntry) error
func WriteContent ¶
func WriteMetadata ¶
func WriteMetadata(md *CacheEntry) error
Types ¶
type ApiCallProvider ¶ added in v0.1.4
type ApiCallProvider struct { // Open for extensions like provided calls Name ApiCallProviderName }
type ApiCallProviderName ¶ added in v0.1.4
type ApiCallProviderName string
const ( ApiCallProviderNameAws ApiCallProviderName = "aws cli python" ApiCallProviderNameGo ApiCallProviderName = "go sdk v2" )
type CacheEntry ¶
type CacheEntry struct { Id *string Cmd *string Created time.Time LastAccessed time.Time AccessCounter int Parameters Parameters Provider string }
CacheEntry Cmd executable command line e.g. aws ec2 describe instances
func ReadMetaData ¶
func ReadMetaData(id *string) (*CacheEntry, error)
func (*CacheEntry) ArgumentsToCachedEntry ¶ added in v0.1.4
func (item *CacheEntry) ArgumentsToCachedEntry(args []string)
type Parameters ¶ added in v0.1.4
type Parameters struct { Service *string Action *string Output *string Region *string Profile *string Parameters map[string]*string Query *string }
func (*Parameters) AlmostEqual ¶ added in v0.1.4
func (a *Parameters) AlmostEqual(b *Parameters) bool
func (*Parameters) AlmostEqualWithParameters ¶ added in v0.1.6
func (a *Parameters) AlmostEqualWithParameters(b *Parameters) bool
Click to show internal directories.
Click to hide internal directories.