Documentation ¶
Index ¶
- func Base64(n int, padded bool) (string, error)
- func Bytes(n int) ([]byte, error)
- func Date(dateStr *string, targetDate *primitive.DateTime)
- func Filter(input interface{}) interface{}
- func GenerateMembershipCardNumber() string
- func IndexOf(slice []string, value string) int
- func Number(n int) string
- func Params(args map[string]interface{}) *api.SearchCollectionParams
- func Project(projection map[string]interface{}) *options.FindOptions
- func Sort(sortCriteria map[string]interface{}) *options.FindOptions
- func String(n int) string
- func StructToMap(obj interface{}) (map[string]interface{}, error)
- func UID(ctx context.Context) (*primitive.ObjectID, error)
- type ContextKey
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateMembershipCardNumber ¶
func GenerateMembershipCardNumber() string
GenerateMembershipCardNumber generates a unique membership card number.
func IndexOf ¶
indexOf finds the index of a string in a slice. It returns -1 if the string is not present in the slice.
func Params ¶
func Params(args map[string]interface{}) *api.SearchCollectionParams
func Project ¶
func Project(projection map[string]interface{}) *options.FindOptions
Project converts a map into MongoDB-compatible projection options.
func Sort ¶
func Sort(sortCriteria map[string]interface{}) *options.FindOptions
Sort converts a map of sort criteria into MongoDB-compatible sort options.
func StructToMap ¶
Types ¶
type ContextKey ¶
type ContextKey string
Click to show internal directories.
Click to hide internal directories.