Documentation ¶
Index ¶
- Variables
- func AreFilesEqual(file1, file2 string) (bool, error)
- func DisplayProfileData()
- func FileModTime(filePath string) (time.Time, error)
- func FilenameNoExtension(fileName string) string
- func GetPluginName(plugin string) string
- func IsMacM1() (bool, error)
- func LogTime(operation string)
- func MergeMaps[M ~map[K]V, K comparable, V any](old, new M) M
- func MoveFile(source string, destination string) error
- func PluginFQNToSchemaName(pluginFQN string) string
- func Pluralize(base string, count int) string
- func SafeIntEqual(i1, i2 *int) bool
- func SafeStringsEqual(s1, s2 interface{}) bool
- func SliceToLookup[K comparable](src []K) map[K]struct{}
- func SortedMapKeys[V any](m map[string]V) []string
- func TimeNow() *time.Time
- func TimePtr(t time.Time) *time.Time
- func ToIntegerPointer(i int) *int
- func ToStringPointer(s string) *string
- func TrimGitUrls(urls []string) []string
- func TrimSchemaName(pluginFQN string) string
- func UnderlyingArch() (string, error)
- func UserConfirmation(warning string) bool
Constants ¶
This section is empty.
Variables ¶
var Timing []timeLog
Functions ¶
func AreFilesEqual ¶
func DisplayProfileData ¶
func DisplayProfileData()
func FilenameNoExtension ¶
func GetPluginName ¶
GetPluginName function is used to get the plugin name required while installing/updating/removing a plugin. External plugins require the repo names to be prefixed(eg: francois2metz/scalingo). Sample input 1: hub.steampipe.io/plugins/francois2metz/scalingo@latest Sample output 1: francois2metz/scalingo Sample input 2: hub.steampipe.io/plugins/turbot/aws@latest Sample output 2: aws
func MergeMaps ¶
func MergeMaps[M ~map[K]V, K comparable, V any](old, new M) M
MergeMaps merges 'new' onto 'old'. Values existing in old already have precedence Any value existing in new but not old is added to old
func MoveFile ¶
MoveFile moves a file from source to destiantion.
It first attempts the movement using OS primitives (os.Rename) If os.Rename fails, it copies the file byte-by-byte to the destination and then removes the source
func PluginFQNToSchemaName ¶
PluginFQNToSchemaName convert a full plugin name to a schema name schemas in postgres are limited to 63 chars - the name may be longer than this, in which case trim the length and add a hash to the end to make unique
func SafeIntEqual ¶
func SafeStringsEqual ¶
func SafeStringsEqual(s1, s2 interface{}) bool
func SliceToLookup ¶
func SliceToLookup[K comparable](src []K) map[K]struct{}
func SortedMapKeys ¶
func ToIntegerPointer ¶
ToIntegerPointer converts an integer into its pointer
func ToStringPointer ¶
ToStringPointer converts a string into its pointer
func TrimGitUrls ¶
Modifies(trims) the URL if contains http ot https in arguments
func TrimSchemaName ¶
func UnderlyingArch ¶
UnderlyingArch detects the underlying architecture(amd64/arm64) of the system we need this to detect the underlying architecture to install the correct FDW package
func UserConfirmation ¶
UserConfirmation displays the warning message and asks the user for input regarding whether to continue or not
Types ¶
This section is empty.