Documentation
¶
Index ¶
- Constants
- func CreateDir(dirName string) error
- func DefaultConfig(home string)
- func ExactArgs(n int) cobra.PositionalArgs
- func FileExists(path string) (bool, error)
- func GetWorkingDirectory() string
- func MinimumNArgs(n int) cobra.PositionalArgs
- func NewHttpClient() *http.Client
- func OpenOnBrowser(url string) error
- func ParseFloat(value string) (float64, error)
- func ParseInteger(strCode string, codeType string) (int, error)
- func ParseProductCode(code string) (string, error)
- func ParseYearMonth(yearMonth string) (time.Time, error)
- func RangeArgs(min int, max int) cobra.PositionalArgs
- func StringInList(str string, list []string) bool
- func ToPrettyJson(body []byte) (string, error)
- type HttpGetManager
- type HttpPostManager
- type SamHttpGetManager
- type SamHttpPostManager
- func (s SamHttpPostManager) Bytes(url string, data []byte) ([]byte, error)
- func (s SamHttpPostManager) File(remoteUrl string, directory string, filename string) (string, error)
- func (s SamHttpPostManager) FileWithDefaultName(remoteUrl string, directory string) (string, error)
- func (s SamHttpPostManager) PrettyJson(url string, data []byte) (string, error)
- func (s SamHttpPostManager) Zip(remoteUrl string, directory string) (string, error)
- type SamTimeManager
- type TimeManager
Constants ¶
View Source
const Version = "0.9.0"
View Source
const YearMonthLayout = "2006-01"
Variables ¶
This section is empty.
Functions ¶
func DefaultConfig ¶
func DefaultConfig(home string)
func ExactArgs ¶
func ExactArgs(n int) cobra.PositionalArgs
ExactArgs returns an error if there are not exactly n args.
func FileExists ¶
func GetWorkingDirectory ¶
func GetWorkingDirectory() string
func MinimumNArgs ¶
func MinimumNArgs(n int) cobra.PositionalArgs
MinimumNArgs returns an error if there is not at least N args.
func NewHttpClient ¶
func OpenOnBrowser ¶
func ParseFloat ¶
func ParseProductCode ¶
func RangeArgs ¶
func RangeArgs(min int, max int) cobra.PositionalArgs
RangeArgs returns an error if the number of args is not within the expected range.
func StringInList ¶
func ToPrettyJson ¶
Types ¶
type HttpGetManager ¶
type HttpGetManager interface {
Bytes(url string) ([]byte, error)
PrettyJson(url string) (string, error)
Type(url string, target interface{}) error
}
func NewHttpGetManager ¶
func NewHttpGetManager() HttpGetManager
type HttpPostManager ¶
type HttpPostManager interface {
Bytes(url string, data []byte) ([]byte, error)
PrettyJson(url string, data []byte) (string, error)
FileWithDefaultName(remoteUrl string, directory string) (string, error)
File(remoteUrl string, directory string, filename string) (string, error)
Zip(remoteUrl string, directory string) (string, error)
}
func NewHttpPostManager ¶
func NewHttpPostManager() HttpPostManager
type SamHttpGetManager ¶
type SamHttpGetManager struct {
// contains filtered or unexported fields
}
func (SamHttpGetManager) PrettyJson ¶
func (s SamHttpGetManager) PrettyJson(url string) (string, error)
func (SamHttpGetManager) Type ¶
func (s SamHttpGetManager) Type(url string, target interface{}) error
type SamHttpPostManager ¶
type SamHttpPostManager struct {
// contains filtered or unexported fields
}
func (SamHttpPostManager) Bytes ¶
func (s SamHttpPostManager) Bytes(url string, data []byte) ([]byte, error)
func (SamHttpPostManager) FileWithDefaultName ¶
func (s SamHttpPostManager) FileWithDefaultName(remoteUrl string, directory string) (string, error)
func (SamHttpPostManager) PrettyJson ¶
func (s SamHttpPostManager) PrettyJson(url string, data []byte) (string, error)
type SamTimeManager ¶
type SamTimeManager struct{}
func (SamTimeManager) Now ¶
func (SamTimeManager) Now() time.Time
type TimeManager ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.