core

package
v0.0.0-...-0b08f29 Latest Latest
Warning

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

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package core implements the configurable backend and tools around it

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CanonicalHeaderToPropertyName

func CanonicalHeaderToPropertyName(header string) string

CanonicalHeaderToPropertyName converts canonical header names to kurbisio JSON property names. Example: "Content-Type" becomes "content_type".

func Plural

func Plural(singular string) string

Plural returns the plural form of the passed singular string.

This is the algorithm used to create idiomatic REST routes

func PropertyNameToCanonicalHeader

func PropertyNameToCanonicalHeader(property string) string

PropertyNameToCanonicalHeader converts kurbisio JSON property names to their canonical header representation. Example: "content_type" becomes "Content-Type".

Types

type Notifier

type Notifier interface {
	Notify(resource string, operation Operation, payload []byte)
}

Notifier is an interface to receive database notifications

type Operation

type Operation string

Operation represents a modifying backend storage operation, one of Create, Read, Update, Delete, List, Clear

const (
	OperationCreate Operation = "create"
	OperationRead   Operation = "read"
	OperationUpdate Operation = "update"
	OperationDelete Operation = "delete"
	OperationList   Operation = "list"
	OperationClear  Operation = "clear"

	OperationCompanionUploaded Operation = "companion_uploaded"
)

all supported database operations OperationCompanionUploaded is only applicable if the reosurce has companion file feature enabled

func (*Operation) UnmarshalJSON

func (o *Operation) UnmarshalJSON(data []byte) error

UnmarshalJSON is a custom JSON unmarshaller

Directories

Path Synopsis
Package access provides utilities for access control
Package access provides utilities for access control
Package backend implements the configurable backend
Package backend implements the configurable backend
kss
Package client provides easy and fast in-process access to a REST api
Package client provides easy and fast in-process access to a REST api
Package registry provides a persistent registry of objects in a SQL database
Package registry provides a persistent registry of objects in a SQL database
Package schema implements JSON validation utilities
Package schema implements JSON validation utilities

Jump to

Keyboard shortcuts

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