Documentation ¶
Index ¶
- func CallerFile(deep int) (path string, line int)
- func CallerFileName(deep int) string
- func CallerFilePath(deep int) string
- func ChangeFileExtension(filename, targetExt string) string
- func ConstantTimeCompareStrings(a, b string) bool
- func GeneratePEMCert(bits int, organization string, maxAge time.Duration) (cert, key []byte, err error)
- func GenerateTLSCert(bits int, organization string, maxAge time.Duration) (*tls.Certificate, error)
- func ImageJPGThumbnail(src io.Reader, filename string, maxWidth, maxHeight uint) ([]byte, error)
- func ImageJPGThumbnailTo(src io.Reader, dst io.Writer, filename string, maxWidth, maxHeight uint) error
- func ImagePNGThumbnail(src io.Reader, filename string, maxWidth, maxHeight uint) ([]byte, error)
- func ImagePNGThumbnailTo(src io.Reader, dst io.Writer, filename string, maxWidth, maxHeight uint) error
- func ImageRead(filename string, src io.Reader) (image.Image, error)
- func NewCloser(f func() error) io.Closer
- func NewDiscardLogger() *log.Logger
- func Perm(s []string, f func([]string))
- func RandBytes(n int) []byte
- func RandBytesTo(buf []byte)
- func RandInit()
- func RandString(n int) string
- func RuntimePkgFileLineByPC(pc uintptr) (file string, line int)
- func RuntimePkgFileLineStrByPC(pc uintptr) string
- func RuntimePkgIndex(file, funcName string) int
- func RuntimePkgPath() string
- func ToSnakeCase(s string) string
- func WaitForExit()
- func Workdir() string
- func WorkdirDSN() string
- func ZAtob(s string) []byte
- func ZBtoa(b []byte) string
- type AES
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CallerFile ¶
CallerFile returns caller file path and line
func CallerFileName ¶
CallerFileName returns name of caller file
func CallerFilePath ¶ added in v1.70.0
CallerFilePath returns path to caller file
func ChangeFileExtension ¶ added in v1.70.0
ChangeFileExtension to
func ConstantTimeCompareStrings ¶ added in v1.70.0
ConstantTimeCompareStrings uses zero alloc converting to bytes
func GeneratePEMCert ¶ added in v1.70.0
func GeneratePEMCert(bits int, organization string, maxAge time.Duration) (cert, key []byte, err error)
GeneratePEMCert self-signed
func GenerateTLSCert ¶ added in v1.70.0
GenerateTLSCert self-signed
func ImageJPGThumbnail ¶ added in v1.70.0
ImageJPGThumbnail converter
func ImageJPGThumbnailTo ¶ added in v1.70.0
func ImageJPGThumbnailTo(src io.Reader, dst io.Writer, filename string, maxWidth, maxHeight uint) error
ImageJPGThumbnailTo converter
func ImagePNGThumbnail ¶ added in v1.70.0
ImagePNGThumbnail converter
func ImagePNGThumbnailTo ¶ added in v1.70.0
func ImagePNGThumbnailTo(src io.Reader, dst io.Writer, filename string, maxWidth, maxHeight uint) error
ImagePNGThumbnailTo converter
func RuntimePkgFileLineByPC ¶ added in v1.70.0
RuntimePkgFileLineByPC caller
func RuntimePkgFileLineStrByPC ¶ added in v1.70.0
RuntimePkgFileLineStrByPC caller
func RuntimePkgIndex ¶ added in v1.70.0
RuntimePkgIndex by caller
func WorkdirDSN ¶ added in v1.70.0
func WorkdirDSN() string
WorkdirDSN returns executable working dir as DSN path
Example on windows: c/users/user/Desktop
Types ¶
type AES ¶ added in v1.70.0
type AES struct {
// contains filtered or unexported fields
}
AES cryptor
func (*AES) DecryptFromBase64 ¶ added in v1.70.0
DecryptFromBase64 data
func (*AES) EncryptToBase64 ¶ added in v1.70.0
EncryptToBase64 data
Click to show internal directories.
Click to hide internal directories.