example

package
v1.119.11 Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2024 License: AGPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrDocsAPI = errs.Class("example docs api")
View Source
var ErrProjectsAPI = errs.Class("example projects api")
View Source
var ErrUsersAPI = errs.Class("example users api")

Functions

This section is empty.

Types

type DocumentsHandler added in v1.87.1

type DocumentsHandler struct {
	// contains filtered or unexported fields
}

DocumentsHandler is an api handler that implements all Documents API endpoints functionality.

func NewDocuments added in v1.87.1

func NewDocuments(log *zap.Logger, mon *monkit.Scope, service DocumentsService, router *mux.Router, auth api.Auth) *DocumentsHandler

type DocumentsService added in v1.87.1

type DocumentsService interface {
	Get(ctx context.Context) ([]myapi.Document, api.HTTPError)
	GetOne(ctx context.Context, path string) (*myapi.Document, api.HTTPError)
	GetTag(ctx context.Context, path, tagName string) (*[2]string, api.HTTPError)
	GetVersions(ctx context.Context, path string) ([]myapi.Version, api.HTTPError)
	UpdateContent(ctx context.Context, path string, id uuid.UUID, date time.Time, request myapi.NewDocument) (*myapi.Document, api.HTTPError)
}

type Project added in v1.96.2

type Project struct {
	ID        uuid.UUID `json:"id"`
	OwnerName string    `json:"ownerName"`
}

Project contains project information.

type ProjectsHandler added in v1.96.2

type ProjectsHandler struct {
	// contains filtered or unexported fields
}

ProjectsHandler is an api handler that implements all Projects API endpoints functionality.

func NewProjects added in v1.96.2

func NewProjects(log *zap.Logger, mon *monkit.Scope, service ProjectsService, router *mux.Router) *ProjectsHandler

type ProjectsService added in v1.96.2

type ProjectsService interface {
	CreateProject(ctx context.Context, request Project) (*Project, api.HTTPError)
}

type UsersHandler added in v1.90.1

type UsersHandler struct {
	// contains filtered or unexported fields
}

UsersHandler is an api handler that implements all Users API endpoints functionality.

func NewUsers added in v1.90.1

func NewUsers(log *zap.Logger, mon *monkit.Scope, service UsersService, router *mux.Router) *UsersHandler

type UsersService added in v1.90.1

type UsersService interface {
	Get(ctx context.Context) ([]myapi.User, api.HTTPError)
	Create(ctx context.Context, request []myapi.User) api.HTTPError
	GetAge(ctx context.Context) (*myapi.UserAge[int16], api.HTTPError)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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