handlers

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Log

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

func NewLog

func NewLog(db *gorm.DB) *Log

func (*Log) DeleteLog

func (p *Log) DeleteLog(ctx *fiber.Ctx) error

DeleteLog deletes the log with the given ID.

func (*Log) GetLog

func (p *Log) GetLog(ctx *fiber.Ctx) error

GetLog gets the log with the given ID and returns any error encountered.

func (*Log) GetLogs

func (p *Log) GetLogs(ctx *fiber.Ctx) error

GetLogs gets the list of all logs and returns any error encountered.

func (*Log) GetSoftwareLogs

func (p *Log) GetSoftwareLogs(ctx *fiber.Ctx) error

GetSoftwareLogs gets the logs associated to a Software with the given ID and returns any error encountered.

func (*Log) PatchLog

func (p *Log) PatchLog(ctx *fiber.Ctx) error

PatchLog updates the log with the given ID.

func (*Log) PostLog

func (p *Log) PostLog(ctx *fiber.Ctx) error

PostLog creates a new log.

func (*Log) PostSoftwareLog

func (p *Log) PostSoftwareLog(ctx *fiber.Ctx) error

PostSoftwareLog creates a new log associated to a Software with the given ID and returns any error encountered.

type LogInterface

type LogInterface interface {
	GetLogs(ctx *fiber.Ctx) error
	GetLog(ctx *fiber.Ctx) error
	PostLog(ctx *fiber.Ctx) error
	PatchLog(ctx *fiber.Ctx) error
	DeleteLog(ctx *fiber.Ctx) error

	GetSoftwareLogs(ctx *fiber.Ctx) error
	PostSoftwareLog(ctx *fiber.Ctx) error
}

type Publisher

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

func NewPublisher

func NewPublisher(db *gorm.DB) *Publisher

func (*Publisher) DeletePublisher

func (p *Publisher) DeletePublisher(ctx *fiber.Ctx) error

DeletePublisher deletes the publisher with the given ID.

func (*Publisher) GetPublisher

func (p *Publisher) GetPublisher(ctx *fiber.Ctx) error

GetPublisher gets the publisher with the given ID and returns any error encountered.

func (*Publisher) GetPublishers

func (p *Publisher) GetPublishers(ctx *fiber.Ctx) error

GetPublishers gets the list of all publishers and returns any error encountered.

func (*Publisher) PatchPublisher

func (p *Publisher) PatchPublisher(ctx *fiber.Ctx) error

PatchPublisher updates the publisher with the given ID. CodeHosting URLs will be overwritten from the request.

func (*Publisher) PostPublisher

func (p *Publisher) PostPublisher(ctx *fiber.Ctx) error

PostPublisher creates a new publisher.

type PublisherInterface

type PublisherInterface interface {
	GetPublishers(ctx *fiber.Ctx) error
	GetPublisher(ctx *fiber.Ctx) error
	PostPublisher(ctx *fiber.Ctx) error
	PatchPublisher(ctx *fiber.Ctx) error
	DeletePublisher(ctx *fiber.Ctx) error
}

type Software

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

func NewSoftware

func NewSoftware(db *gorm.DB) *Software

func (*Software) DeleteSoftware

func (p *Software) DeleteSoftware(ctx *fiber.Ctx) error

DeleteSoftware deletes the software with the given ID.

func (*Software) GetAllSoftware

func (p *Software) GetAllSoftware(ctx *fiber.Ctx) error

GetAllSoftware gets the list of all software and returns any error encountered.

func (*Software) GetSoftware

func (p *Software) GetSoftware(ctx *fiber.Ctx) error

GetSoftware gets the software with the given ID and returns any error encountered.

func (*Software) PatchSoftware

func (p *Software) PatchSoftware(ctx *fiber.Ctx) error

PatchSoftware updates the software with the given ID.

func (*Software) PostSoftware

func (p *Software) PostSoftware(ctx *fiber.Ctx) error

PostSoftware creates a new software.

type SoftwareInterface

type SoftwareInterface interface {
	GetAllSoftware(ctx *fiber.Ctx) error
	GetSoftware(ctx *fiber.Ctx) error
	PostSoftware(ctx *fiber.Ctx) error
	PatchSoftware(ctx *fiber.Ctx) error
	DeleteSoftware(ctx *fiber.Ctx) error
}

type Status

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

func NewStatus

func NewStatus(db *gorm.DB) *Status

func (*Status) GetStatus

func (s *Status) GetStatus(ctx *fiber.Ctx) error

GetStatus gets status of the API.

type Webhook added in v0.3.0

type Webhook[T models.Model] struct {
	// contains filtered or unexported fields
}

func NewWebhook added in v0.3.0

func NewWebhook[T models.Model](db *gorm.DB) *Webhook[T]

func (*Webhook[T]) DeleteWebhook added in v0.3.0

func (p *Webhook[T]) DeleteWebhook(ctx *fiber.Ctx) error

DeleteWebhook deletes the webhook with the given ID.

func (*Webhook[T]) GetResourceWebhooks added in v0.3.0

func (p *Webhook[T]) GetResourceWebhooks(ctx *fiber.Ctx) error

GetResourceWebhooks gets the webhooks associated to resources (fe. Software, Publishers) and returns any error encountered.

func (*Webhook[T]) GetSingleResourceWebhooks added in v0.3.0

func (p *Webhook[T]) GetSingleResourceWebhooks(ctx *fiber.Ctx) error

GetSingleResourceWebhooks gets the webhooks associated to a resource (fe. a specific Software or Publisher) with the given ID and returns any error encountered.

func (*Webhook[T]) GetWebhook added in v0.3.0

func (p *Webhook[T]) GetWebhook(ctx *fiber.Ctx) error

GetWebhook gets the webhook with the given ID and returns any error encountered.

func (*Webhook[T]) PatchWebhook added in v0.3.0

func (p *Webhook[T]) PatchWebhook(ctx *fiber.Ctx) error

PatchWebhook updates the webhook with the given ID.

func (*Webhook[T]) PostResourceWebhook added in v0.3.0

func (p *Webhook[T]) PostResourceWebhook(ctx *fiber.Ctx) error

PostSingleResourceWebhook creates a new webhook associated to resources (fe. Software, Publishers) and returns any error encountered.

func (*Webhook[T]) PostSingleResourceWebhook added in v0.3.0

func (p *Webhook[T]) PostSingleResourceWebhook(ctx *fiber.Ctx) error

PostResourceWebhook creates a new webhook associated to a resource with the given ID (fe. a specific Software or Publisher) and returns any error encountered.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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