api

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2025 License: Apache-2.0 Imports: 28 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApplicationJsonType = "application/json"
)

Variables

View Source
var (
	MsgNotFound    = "Not found"
	MsgInavlidUUID = "Invalid uuid"
)

Functions

This section is empty.

Types

type API

type API struct {
	DB *db.DB
	// contains filtered or unexported fields
}

func NewAPI

func NewAPI(cfg *config.Config, db *db.DB, dispatcher *dispatcher.Dispatcher, tracer *tracing.Tracer) *API

func (*API) CreateEndpoint

func (api *API) CreateEndpoint(w http.ResponseWriter, r *http.Request)

func (*API) CreateEvent

func (api *API) CreateEvent(w http.ResponseWriter, r *http.Request)

func (*API) CreatePlugin added in v0.2.0

func (api *API) CreatePlugin(w http.ResponseWriter, r *http.Request)

func (*API) CreateSource

func (api *API) CreateSource(w http.ResponseWriter, r *http.Request)

func (*API) CreateWorkspace

func (api *API) CreateWorkspace(w http.ResponseWriter, r *http.Request)

func (*API) DeleteEndpoint

func (api *API) DeleteEndpoint(w http.ResponseWriter, r *http.Request)

func (*API) DeletePlugin added in v0.2.0

func (api *API) DeletePlugin(w http.ResponseWriter, r *http.Request)

func (*API) DeleteSource

func (api *API) DeleteSource(w http.ResponseWriter, r *http.Request)

func (*API) DeleteWorkspace

func (api *API) DeleteWorkspace(w http.ResponseWriter, r *http.Request)

func (*API) Dump added in v0.4.0

func (api *API) Dump(w http.ResponseWriter, r *http.Request)

func (*API) GetAttempt

func (api *API) GetAttempt(w http.ResponseWriter, r *http.Request)

func (*API) GetEndpoint

func (api *API) GetEndpoint(w http.ResponseWriter, r *http.Request)

func (*API) GetEvent

func (api *API) GetEvent(w http.ResponseWriter, r *http.Request)

func (*API) GetPlugin added in v0.2.0

func (api *API) GetPlugin(w http.ResponseWriter, r *http.Request)

func (*API) GetSource

func (api *API) GetSource(w http.ResponseWriter, r *http.Request)

func (*API) GetWorkspace

func (api *API) GetWorkspace(w http.ResponseWriter, r *http.Request)

func (*API) Handler

func (api *API) Handler() http.Handler

Handler returns a http.Handler

func (*API) Index

func (api *API) Index(w http.ResponseWriter, r *http.Request)

func (*API) PageAttempt

func (api *API) PageAttempt(w http.ResponseWriter, r *http.Request)

func (*API) PageEndpoint

func (api *API) PageEndpoint(w http.ResponseWriter, r *http.Request)

func (*API) PageEvent

func (api *API) PageEvent(w http.ResponseWriter, r *http.Request)

func (*API) PagePlugin added in v0.2.0

func (api *API) PagePlugin(w http.ResponseWriter, r *http.Request)

func (*API) PageSource

func (api *API) PageSource(w http.ResponseWriter, r *http.Request)

func (*API) PageWorkspace

func (api *API) PageWorkspace(w http.ResponseWriter, r *http.Request)

func (*API) RetryEvent added in v0.2.0

func (api *API) RetryEvent(w http.ResponseWriter, r *http.Request)

func (*API) Sync added in v0.4.0

func (api *API) Sync(w http.ResponseWriter, r *http.Request)

func (*API) UpdateEndpoint

func (api *API) UpdateEndpoint(w http.ResponseWriter, r *http.Request)

func (*API) UpdatePlugin added in v0.2.0

func (api *API) UpdatePlugin(w http.ResponseWriter, r *http.Request)

func (*API) UpdateSource

func (api *API) UpdateSource(w http.ResponseWriter, r *http.Request)

func (*API) UpdateWorkspace

func (api *API) UpdateWorkspace(w http.ResponseWriter, r *http.Request)

type ErrorResponse

type ErrorResponse struct {
	Message string      `json:"message"`
	Error   interface{} `json:"error,omitempty"`
}

type Pagination

type Pagination[T any] struct {
	Total int64 `json:"total"`
	Data  []T   `json:"data"`
}

func NewPagination

func NewPagination[T any](total int64, data []T) *Pagination[T]

Jump to

Keyboard shortcuts

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