site

package
v0.0.0-...-d39f515 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidGoogleOauthToken = errors.New("invalid Google oauth token")
)

Functions

func Delete

func Delete(dp *depot.Depot, id uint64) error

Types

type CreatePayload

type CreatePayload struct {
	Domain              *string        `json:"domain"`
	IsPublic            *bool          `json:"isPublic"`
	Name                *string        `json:"name"`
	SafeQueryParameters pq.StringArray `json:"safeQueryParameters"`
}

type GoogleSearchConsoleSite

type GoogleSearchConsoleSite struct {
	SiteUrl string `json:"siteUrl"`
}

func ListGoogleSearchConsoleSites

func ListGoogleSearchConsoleSites(dp *depot.Depot, organizationId uint64) ([]*GoogleSearchConsoleSite, error)

type Site

type Site struct {
	CreatedAt                  time.Time      `json:"createdAt"`
	Domain                     string         `json:"domain"`
	GoogleSearchConsoleSiteUrl *string        `json:"googleSearchConsoleSiteUrl"`
	HasEvents                  bool           `json:"hasEvents"`
	Id                         uint64         `json:"id"`
	IsPublic                   bool           `json:"isPublic"`
	Name                       string         `json:"name"`
	SafeQueryParameters        pq.StringArray `json:"safeQueryParameters" gorm:"type:text[]"`
	UpdatedAt                  time.Time      `json:"updatedAt"`
}

func Create

func Create(dp *depot.Depot, organizationId uint64, payload *CreatePayload) (*Site, error)

func List

func List(dp *depot.Depot, organizationId uint64) ([]*Site, error)

func Read

func Read(dp *depot.Depot, id uint64) (*Site, error)

func ReadPublic

func ReadPublic(dp *depot.Depot, domain string) (*Site, error)

func Update

func Update(dp *depot.Depot, id uint64, payload *UpdatePayload) (*Site, error)

type UpdatePayload

type UpdatePayload struct {
	GoogleSearchConsoleSiteUrl utils.Optional[string] `json:"googleSearchConsoleSiteUrl"`
	IsPublic                   *bool                  `json:"isPublic"`
	Name                       *string                `json:"name"`
	SafeQueryParameters        pq.StringArray         `gorm:"type:text[]" json:"safeQueryParameters"`
}

Jump to

Keyboard shortcuts

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