content

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package content contains the compile-tested model used by the public Quickstart.

Index

Constants

This section is empty.

Variables

View Source
var Posts = ridu.Collection{
	Slug: "posts",
	Access: ridu.CollectionAccess{
		Create: authenticatedOnly,
		Read:   authenticatedOnly,
		Update: authenticatedOnly,
		Delete: authenticatedOnly,
	},
	Fields: []field.Definition{
		field.Text("title", field.Required()),
		field.Textarea(
			"summary",
			field.MaxLength(240),
			field.Description("A short introduction used by post cards."),
		),
		field.Select(
			"status",
			field.OneOf("draft", "published"),
			field.Default("draft"),
		),
		field.Relationship("author", field.To("users")),
		richtext.Field("content"),
	},
}

Posts is the starter collection after the Quickstart adds its summary field.

View Source
var Users = ridu.Collection{
	Slug: "users",
	Auth: true,
	Access: ridu.CollectionAccess{
		Admin:  authenticatedOnly,
		Read:   authenticatedOnly,
		Update: authenticatedOnly,
		Delete: authenticatedOnly,
	},
	Fields: []field.Definition{
		field.Email("email", field.Required(), field.Unique()),
	},
}

Users is the authenticated admin collection generated by the starter template.

Functions

func Config

func Config() ridu.Config

Config is the smallest complete application model behind the Quickstart examples.

Types

This section is empty.

Jump to

Keyboard shortcuts

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