package internal

Import Path
	github.com/go-pg/pg/v10/internal (on go.dev)

Dependency Relation
	imports 9 packages, and imported by 5 packages

Involved Source Files context.go error.go internal is a private internal package. log.go strconv.go underscore.go unsafe.go util.go
Package-Level Type Names (total 5, in which 4 are exported)
/* sort exporteds by: | */
( Error) Error() string Error : error func Errorf(s string, args ...interface{}) Error var ErrMultiRows var ErrNoRows var github.com/go-pg/pg/v10.ErrMultiRows var github.com/go-pg/pg/v10.ErrNoRows
( Logging) Printf(ctx context.Context, format string, v ...interface{}) func github.com/go-pg/pg/v10.SetLogger(logger Logging) var Logger
( PGError) Error() string ( PGError) Field(k byte) string ( PGError) IntegrityViolation() bool PGError : github.com/go-pg/pg/v10.Error PGError : error func NewPGError(m map[byte]string) PGError
Context context.Context ( UndoneContext) Deadline() (deadline time.Time, ok bool) ( UndoneContext) Done() <-chan struct{} ( UndoneContext) Err() error Value returns the value associated with this context for key, or nil if no value is associated with key. Successive calls to Value with the same key returns the same result. Use context values only for request-scoped data that transits processes and API boundaries, not for passing optional parameters to functions. A key identifies a specific value in a Context. Functions that wish to store values in Context typically allocate a key in a global variable then use that key as the argument to context.WithValue and Context.Value. A key can be any type that supports equality; packages should define keys as an unexported type to avoid collisions. Packages that define a Context key should provide type-safe accessors for the values stored using that key: // Package user defines a User type that's stored in Contexts. package user import "context" // User is the type of value stored in the Contexts. type User struct {...} // key is an unexported type for keys defined in this package. // This prevents collisions with keys defined in other packages. type key int // userKey is the key for user.User values in Contexts. It is // unexported; clients use user.NewContext and user.FromContext // instead of using this key directly. var userKey key // NewContext returns a new Context that carries value u. func NewContext(ctx context.Context, u *User) context.Context { return context.WithValue(ctx, userKey, u) } // FromContext returns the User value stored in ctx, if any. func FromContext(ctx context.Context) (*User, bool) { u, ok := ctx.Value(userKey).(*User) return u, ok } UndoneContext : context.Context func UndoContext(ctx context.Context) UndoneContext
Package-Level Functions (total 23, in which 22 are exported)
BytesToString converts byte slice to string.
func Errorf(s string, args ...interface{}) Error
func ParseFloat(b []byte, bitSize int) (float64, error)
func ParseInt(b []byte, base int, bitSize int) (int64, error)
func ParseUint(b []byte, base int, bitSize int) (uint64, error)
func RetryBackoff(retry int, minBackoff, maxBackoff time.Duration) time.Duration
StringToBytes converts string to byte slice.
Underscore converts "CamelCasedString" to "camel_cased_string".
Package-Level Variables (total 5, all are exported)