Documentation
¶
Index ¶
- Constants
- type AddClientForm
- type ApiError
- type Client
- type CommaSeparatedStrings
- type CreateProjectForm
- type CreateUserForm
- type FormBool
- type GetProjectPageInput
- type GetUserPageInput
- type LoginForm
- type LoginFormWithToken
- type NullableDate
- type ProjectDto
- type RemoveClientForm
- type ResetPasswordForm
- type ServerEnv
- type StoredClient
- type StoredLog
Constants ¶
const ( UsernameMaxLength = 255 UserProfileNameMaxLength = 255 UserSearchMaxLength = 1024 )
const ( ProjectNameMaxLength = 255 ClientNameMaxLength = 255 ProjectSearchMaxLength = 1024 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddClientForm ¶
type ApiError ¶
type CommaSeparatedStrings ¶
type CommaSeparatedStrings []string
CommaSeparatedStrings is a custom type for handling comma-separated values from selectbox component. It implements echo.BindUnmarshaler to split comma-separated strings into a slice. This is needed because the templui selectbox component sends multiple values as "val1,val2,val3" instead of multiple form fields with the same name.
func (*CommaSeparatedStrings) UnmarshalParam ¶
func (css *CommaSeparatedStrings) UnmarshalParam(param string) error
func (*CommaSeparatedStrings) UnmarshalParams ¶
func (css *CommaSeparatedStrings) UnmarshalParams(params []string) error
UnmarshalParam implements echo's BindUnmarshaler interface for custom form binding. It splits comma-separated values into a string slice. UnmarshalParams accepts repeated fields and comma-separated values. shadcn-templ's multiple combobox submits one input per value; the v1 selectbox submitted one comma-separated field.
type CreateProjectForm ¶
type CreateUserForm ¶
type CreateUserForm struct {
ID string `json:"id" form:"id"`
Username string `json:"username" form:"username" validate:"required,gte=3"`
FirstName string `json:"firstName" form:"firstName" validate:"required,gte=3"`
LastName string `json:"lastName" form:"lastName" validate:"required,gte=3"`
Role string `json:"role" form:"role" validate:"required,oneof=user admin"`
ProjectIDs CommaSeparatedStrings `json:"projects" form:"projects"`
Projects []combobox.Option `json:"-" form:"-"`
}
type GetProjectPageInput ¶
type GetUserPageInput ¶
type LoginFormWithToken ¶
type LoginFormWithToken struct {
Token string `json:"token" form:"token" query:"token" validate:"required,gte=5"`
}
type NullableDate ¶
NullableDate is a custom type for handling optional date inputs from forms. It implements echo.BindUnmarshaler to support multiple date formats.
func (*NullableDate) UnmarshalParam ¶
func (nd *NullableDate) UnmarshalParam(param string) error
UnmarshalParam implements echo's BindUnmarshaler interface for custom form binding. An empty value means no expiry. YYYY-MM-DD is a UTC calendar day and is stored as the exclusive end of that day, the start of the next UTC day, so the selected day remains valid through its end. RFC3339 values stay absolute instants.
type ProjectDto ¶
type RemoveClientForm ¶
type ResetPasswordForm ¶
type ServerEnv ¶
type ServerEnv struct {
LogLevel string `env:"LOG_LEVEL" envDefault:"info"`
LogConnectionString string `env:"SVAROG_CONN_STRING"`
PostgresURL string `env:"POSTGRES_URL" envDefault:"postgres://svarog:svarog@localhost:5434/svarog?sslmode=disable"`
ServerDnsName string `env:"SERVER_DNS_NAME"`
HttpServerPort int `env:"HTTP_SERVER_PORT"`
SessionSecret string `env:"SESSION_SECRET"`
ArchiveDir string `env:"ARCHIVE_DIR"`
ArchiveSchedulerEnabled bool `env:"ARCHIVE_SCHEDULER_ENABLED" envDefault:"true"`
IngestStreamMaxBytes int64 `env:"INGEST_STREAM_MAX_BYTES" envDefault:"0"`
IngestAckWait time.Duration `env:"INGEST_ACK_WAIT" envDefault:"60s"`
IngestAllowRetentionMigration bool `env:"INGEST_ALLOW_RETENTION_MIGRATION" envDefault:"false"`
ArchiveS3Bucket string `env:"ARCHIVE_S3_BUCKET"`
ArchiveS3Endpoint string `env:"ARCHIVE_S3_ENDPOINT"`
ArchiveS3Region string `env:"ARCHIVE_S3_REGION" envDefault:"auto"`
ArchiveS3AccessKeyID string `env:"ARCHIVE_S3_ACCESS_KEY_ID"`
ArchiveS3SecretAccessKey string `env:"ARCHIVE_S3_SECRET_ACCESS_KEY"`
NatsPublicAddr string `env:"NATS_PUBLIC_ADDR"`
NatsAddr string `env:"NATS_ADDR"`
NatsAccountSeed string `env:"NATS_ACCOUNT_SEED"`
NatsServerUserJWT string `env:"NATS_SERVER_USER_JWT"`
NatsServerUserSeed string `env:"NATS_SERVER_USER_SEED"`
}