admin

package
v0.0.0-...-9d82fa0 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2026 License: MIT Imports: 23 Imported by: 0

Documentation

Overview

Code generated by ent, DO NOT EDIT.

Code generated by ent, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FieldLabel

func FieldLabel(name string) string

FieldLabel provides a label for an entity field name (ie, user_id -> User ID).

func GetEntityTypeNames

func GetEntityTypeNames() []string

Types

type ChatBan

type ChatBan struct {
	IpHash    *string    `form:"ip_hash"`
	Reason    *string    `form:"reason"`
	CreatedAt *time.Time `form:"created_at"`
}

type ChatMessage

type ChatMessage struct {
	Body       string     `form:"body"`
	SenderName string     `form:"sender_name"`
	CreatedAt  *time.Time `form:"created_at"`
}

type ChatRoom

type ChatRoom struct {
	Name         string     `form:"name"`
	IsPublic     bool       `form:"is_public"`
	PasswordHash *string    `form:"password_hash"`
	CreatedAt    *time.Time `form:"created_at"`
}

type EntityList

type EntityList struct {
	Columns     []string
	Entities    []EntityValues
	Page        int
	HasNextPage bool
}

type EntityValues

type EntityValues struct {
	ID     int
	Values []string
}

type Extension

type Extension struct {
	entc.DefaultExtension
}

Extension is the Ent extension that generates code to support the entity admin panel.

func (*Extension) Templates

func (*Extension) Templates() []*gen.Template

type Handler

type Handler struct {
	Config HandlerConfig
	// contains filtered or unexported fields
}

func NewHandler

func NewHandler(client *ent.Client, cfg HandlerConfig) *Handler

func (*Handler) ChatBanCreate

func (h *Handler) ChatBanCreate(ctx echo.Context) error

func (*Handler) ChatBanDelete

func (h *Handler) ChatBanDelete(ctx echo.Context, id int) error

func (*Handler) ChatBanGet

func (h *Handler) ChatBanGet(ctx echo.Context, id int) (url.Values, error)

func (*Handler) ChatBanList

func (h *Handler) ChatBanList(ctx echo.Context) (*EntityList, error)

func (*Handler) ChatBanUpdate

func (h *Handler) ChatBanUpdate(ctx echo.Context, id int) error

func (*Handler) ChatMessageCreate

func (h *Handler) ChatMessageCreate(ctx echo.Context) error

func (*Handler) ChatMessageDelete

func (h *Handler) ChatMessageDelete(ctx echo.Context, id int) error

func (*Handler) ChatMessageGet

func (h *Handler) ChatMessageGet(ctx echo.Context, id int) (url.Values, error)

func (*Handler) ChatMessageList

func (h *Handler) ChatMessageList(ctx echo.Context) (*EntityList, error)

func (*Handler) ChatMessageUpdate

func (h *Handler) ChatMessageUpdate(ctx echo.Context, id int) error

func (*Handler) ChatRoomCreate

func (h *Handler) ChatRoomCreate(ctx echo.Context) error

func (*Handler) ChatRoomDelete

func (h *Handler) ChatRoomDelete(ctx echo.Context, id int) error

func (*Handler) ChatRoomGet

func (h *Handler) ChatRoomGet(ctx echo.Context, id int) (url.Values, error)

func (*Handler) ChatRoomList

func (h *Handler) ChatRoomList(ctx echo.Context) (*EntityList, error)

func (*Handler) ChatRoomUpdate

func (h *Handler) ChatRoomUpdate(ctx echo.Context, id int) error

func (*Handler) Create

func (h *Handler) Create(ctx echo.Context, entityType string) error

func (*Handler) Delete

func (h *Handler) Delete(ctx echo.Context, entityType string, id int) error

func (*Handler) Get

func (h *Handler) Get(ctx echo.Context, entityType string, id int) (url.Values, error)

func (*Handler) List

func (h *Handler) List(ctx echo.Context, entityType string) (*EntityList, error)

func (*Handler) PasswordTokenCreate

func (h *Handler) PasswordTokenCreate(ctx echo.Context) error

func (*Handler) PasswordTokenDelete

func (h *Handler) PasswordTokenDelete(ctx echo.Context, id int) error

func (*Handler) PasswordTokenGet

func (h *Handler) PasswordTokenGet(ctx echo.Context, id int) (url.Values, error)

func (*Handler) PasswordTokenList

func (h *Handler) PasswordTokenList(ctx echo.Context) (*EntityList, error)

func (*Handler) PasswordTokenUpdate

func (h *Handler) PasswordTokenUpdate(ctx echo.Context, id int) error

func (*Handler) PaymentCustomerCreate

func (h *Handler) PaymentCustomerCreate(ctx echo.Context) error

func (*Handler) PaymentCustomerDelete

func (h *Handler) PaymentCustomerDelete(ctx echo.Context, id int) error

func (*Handler) PaymentCustomerGet

func (h *Handler) PaymentCustomerGet(ctx echo.Context, id int) (url.Values, error)

func (*Handler) PaymentCustomerList

func (h *Handler) PaymentCustomerList(ctx echo.Context) (*EntityList, error)

func (*Handler) PaymentCustomerUpdate

func (h *Handler) PaymentCustomerUpdate(ctx echo.Context, id int) error

func (*Handler) PaymentIntentCreate

func (h *Handler) PaymentIntentCreate(ctx echo.Context) error

func (*Handler) PaymentIntentDelete

func (h *Handler) PaymentIntentDelete(ctx echo.Context, id int) error

func (*Handler) PaymentIntentGet

func (h *Handler) PaymentIntentGet(ctx echo.Context, id int) (url.Values, error)

func (*Handler) PaymentIntentList

func (h *Handler) PaymentIntentList(ctx echo.Context) (*EntityList, error)

func (*Handler) PaymentIntentUpdate

func (h *Handler) PaymentIntentUpdate(ctx echo.Context, id int) error

func (*Handler) PaymentMethodCreate

func (h *Handler) PaymentMethodCreate(ctx echo.Context) error

func (*Handler) PaymentMethodDelete

func (h *Handler) PaymentMethodDelete(ctx echo.Context, id int) error

func (*Handler) PaymentMethodGet

func (h *Handler) PaymentMethodGet(ctx echo.Context, id int) (url.Values, error)

func (*Handler) PaymentMethodList

func (h *Handler) PaymentMethodList(ctx echo.Context) (*EntityList, error)

func (*Handler) PaymentMethodUpdate

func (h *Handler) PaymentMethodUpdate(ctx echo.Context, id int) error

func (*Handler) SubscriptionCreate

func (h *Handler) SubscriptionCreate(ctx echo.Context) error

func (*Handler) SubscriptionDelete

func (h *Handler) SubscriptionDelete(ctx echo.Context, id int) error

func (*Handler) SubscriptionGet

func (h *Handler) SubscriptionGet(ctx echo.Context, id int) (url.Values, error)

func (*Handler) SubscriptionList

func (h *Handler) SubscriptionList(ctx echo.Context) (*EntityList, error)

func (*Handler) SubscriptionUpdate

func (h *Handler) SubscriptionUpdate(ctx echo.Context, id int) error

func (*Handler) Update

func (h *Handler) Update(ctx echo.Context, entityType string, id int) error

func (*Handler) UserCreate

func (h *Handler) UserCreate(ctx echo.Context) error

func (*Handler) UserDelete

func (h *Handler) UserDelete(ctx echo.Context, id int) error

func (*Handler) UserGet

func (h *Handler) UserGet(ctx echo.Context, id int) (url.Values, error)

func (*Handler) UserList

func (h *Handler) UserList(ctx echo.Context) (*EntityList, error)

func (*Handler) UserUpdate

func (h *Handler) UserUpdate(ctx echo.Context, id int) error

type HandlerConfig

type HandlerConfig struct {
	ItemsPerPage int
	PageQueryKey string
	TimeFormat   string
}

type PasswordToken

type PasswordToken struct {
	Token     *string    `form:"token"`
	UserID    int        `form:"user_id"`
	CreatedAt *time.Time `form:"created_at"`
}

type PaymentCustomer

type PaymentCustomer struct {
	ProviderCustomerID string                  `form:"provider_customer_id"`
	Provider           *string                 `form:"provider"`
	Email              string                  `form:"email"`
	Name               *string                 `form:"name"`
	Metadata           *map[string]interface{} `form:"metadata"`
	CreatedAt          *time.Time              `form:"created_at"`
	UpdatedAt          *time.Time              `form:"updated_at"`
}

type PaymentIntent

type PaymentIntent struct {
	ProviderPaymentIntentID string                  `form:"provider_payment_intent_id"`
	Provider                *string                 `form:"provider"`
	Status                  *paymentintent.Status   `form:"status"`
	Amount                  int64                   `form:"amount"`
	Currency                *string                 `form:"currency"`
	Description             *string                 `form:"description"`
	ClientSecret            *string                 `form:"client_secret"`
	Metadata                *map[string]interface{} `form:"metadata"`
	CreatedAt               *time.Time              `form:"created_at"`
	UpdatedAt               *time.Time              `form:"updated_at"`
}

type PaymentMethod

type PaymentMethod struct {
	ProviderPaymentMethodID string                  `form:"provider_payment_method_id"`
	Provider                *string                 `form:"provider"`
	Type                    *paymentmethod.Type     `form:"type"`
	LastFour                *string                 `form:"last_four"`
	Brand                   *string                 `form:"brand"`
	ExpMonth                *int                    `form:"exp_month"`
	ExpYear                 *int                    `form:"exp_year"`
	IsDefault               bool                    `form:"is_default"`
	Metadata                *map[string]interface{} `form:"metadata"`
	CreatedAt               *time.Time              `form:"created_at"`
	UpdatedAt               *time.Time              `form:"updated_at"`
}

type Subscription

type Subscription struct {
	ProviderSubscriptionID string                  `form:"provider_subscription_id"`
	Provider               *string                 `form:"provider"`
	Status                 *subscription.Status    `form:"status"`
	PriceID                string                  `form:"price_id"`
	Amount                 int64                   `form:"amount"`
	Currency               *string                 `form:"currency"`
	Interval               subscription.Interval   `form:"interval"`
	IntervalCount          *int                    `form:"interval_count"`
	CurrentPeriodStart     *time.Time              `form:"current_period_start"`
	CurrentPeriodEnd       *time.Time              `form:"current_period_end"`
	TrialStart             *time.Time              `form:"trial_start"`
	TrialEnd               *time.Time              `form:"trial_end"`
	CanceledAt             *time.Time              `form:"canceled_at"`
	EndedAt                *time.Time              `form:"ended_at"`
	Metadata               *map[string]interface{} `form:"metadata"`
	CreatedAt              *time.Time              `form:"created_at"`
	UpdatedAt              *time.Time              `form:"updated_at"`
}

type User

type User struct {
	Name      string     `form:"name"`
	Email     string     `form:"email"`
	Password  *string    `form:"password"`
	Verified  bool       `form:"verified"`
	Admin     bool       `form:"admin"`
	CreatedAt *time.Time `form:"created_at"`
}

Jump to

Keyboard shortcuts

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