site

package
v1.42.3 Latest Latest
Warning

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

Go to latest
Published: May 6, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Query

Query returns a datastore query for sites.

Types

type Document

type Document struct {
	// Special Kind Facet
	Kind string `search:",facet"`

	Id_    string
	Name   string
	Domain string
	Url    string
}

func (Document) Id

func (d Document) Id() string

type Site

type Site struct {
	mixin.Model[Site]

	Domain string `json:"domain"`
	Name   string `json:"name"`
	Url    string `json:"url"`

	Netlify_ netlify.Site `json:"-"`
}

func Fake

func Fake(db *datastore.Datastore) *Site

func New

func New(db *datastore.Datastore) *Site

New creates a new Site wired to the given datastore.

func (*Site) AfterCreate

func (s *Site) AfterCreate() error

func (*Site) AfterDelete

func (s *Site) AfterDelete() error

func (*Site) AfterUpdate

func (s *Site) AfterUpdate(previous *Site) error

func (*Site) BeforeCreate

func (s *Site) BeforeCreate() error

Create

func (*Site) BeforeDelete

func (s *Site) BeforeDelete() error

Delete

func (*Site) BeforeUpdate

func (s *Site) BeforeUpdate(previous *Site) error

Update

func (Site) Document

func (s Site) Document() mixin.Document

func (Site) Netlify

func (s Site) Netlify() *netlify.Site

Return netlify overriden with our local properties

func (*Site) SetNetlify

func (s *Site) SetNetlify(nsite *netlify.Site)

Jump to

Keyboard shortcuts

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