Documentation ¶
Index ¶
- func Client() *modelgen.Client
- func Connect() (err error)
- func MarshalUUID(uuid uuid.UUID) graphql.Marshaler
- func Migrate() (err error)
- func TranslateFlagFromORM(flags []string) []typesgen.Flag
- func TranslateFlagToORM(flags ...typesgen.Flag) []string
- func UnmarshalUUID(v interface{}) (uuid.UUID, error)
- func UserFirstOrCreateFromComplexLocation(ctx context.Context, l *duoapi.Location[duoapi.ComplexLocationUser]) (*modelgen.User, error)
- func UserFirstOrCreateFromLocation(ctx context.Context, l *duoapi.Location[duoapi.LocationUser]) (*modelgen.User, error)
- func WithTx(ctx context.Context, client *modelgen.Client, fn func(tx *modelgen.Tx) error) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MarshalUUID ¶
Function for converting a time-object to an RFC3339-String with GraphQL. Returns the corresponding marshaller to perform this task.
func TranslateFlagFromORM ¶
TranslateORMToFlag converts a slice of string to a slice of Flag. The string slice must be in the same format as the ORM.
func TranslateFlagToORM ¶
TranslateFlagToORM converts a slice of Flag to a slice of string that can be used in ORM.
func UnmarshalUUID ¶
Function for converting a RFC3339 Time-String into an time-object. Used by GraphQL. Returns a Time-Object representing the Time-String.
func UserFirstOrCreateFromComplexLocation ¶
func UserFirstOrCreateFromLocation ¶
func WithTx ¶
WithTx is a helper function to wrap a function call with a transaction. If the function returns an error, the transaction is rolled back. If the function returns nil, the transaction is committed. See https://entgo.io/docs/transactions/#best-practices
Types ¶
This section is empty.