entity

package
v2.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 25, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrPermissionDenied            = errors.New("permission denied")
	ErrNotFound                    = errors.New("entity not found")
	ErrIdemKeyParamsMismatch       = errors.New("params mismatch")
	ErrIdemKeyRequestInProgress    = errors.New("request in progress")
	ErrIdemKeyUnknownRecoveryPoint = errors.New("unknown recovery point")
	ErrPaymentProvider             = errors.New("card error from payment processor")
	ErrPaymentProviderGeneric      = errors.New("generic error from payment processor")
	ErrInternalError               = errors.New("internal error")
)

Functions

This section is empty.

Types

type AuditRecord

type AuditRecord struct {
	ID           int64
	Action       audit.Action
	CreatedAt    time.Time `bun:",nullzero,notnull,default:current_timestamp"`
	Data         json.RawMessage
	OriginIP     string
	ResourceID   int64
	ResourceType audit.ResourceType
	UserID       int64
}

type IdempotencyKey

type IdempotencyKey struct {
	ID             int64
	CreatedAt      time.Time `bun:",nullzero,notnull,default:current_timestamp"`
	IdempotencyKey string
	LastRunAt      time.Time
	LockedAt       *time.Time
	RequestMethod  string
	RequestParams  json.RawMessage
	RequestPath    string
	ResponseCode   *idempotency.ResponseCode
	ResponseBody   *idempotency.ResponseBody
	RecoveryPoint  idempotency.RecoveryPoint
	UserID         int64
	User           *User `json:"-" bun:"-"`
}

type Ride

type Ride struct {
	ID               int64
	CreatedAt        time.Time `bun:",nullzero,notnull,default:current_timestamp"`
	IdempotencyKeyID *int64
	OriginLat        float64 `json:"origin_lat"`
	OriginLon        float64 `json:"origin_lon"`
	TargetLat        float64 `json:"target_lat"`
	TargetLon        float64 `json:"target_lon"`
	StripeChargeID   *string
	UserID           int64
}

type StagedJob

type StagedJob struct {
	ID      int64
	JobName stagedjob.JobName
	JobArgs json.RawMessage
}

type User

type User struct {
	ID               int64
	Email            string
	StripeCustomerID string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL