connections

package
v1.0.18 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnRequestRequest

type ConnRequestRequest struct {
	Type string
}

type ConnRequestResponse

type ConnRequestResponse struct {
	URL string
}

type ConnUpsertRequest

type ConnUpsertRequest struct {
	Name      string
	Type      string
	RequestId string
	PostForm  map[string][]string
	// TODO breadchris move to middleware
	TeamID uint
}

type ConnUpsertResponse

type ConnUpsertResponse struct {
	Name      string
	Type      string
	Settings  map[string]any
	APIKey    string
	APIURL    string
	RequestID string
}

type DeleteDestinationRequest

type DeleteDestinationRequest struct {
	DestID uint
}

type DeleteDestinationResponse

type DeleteDestinationResponse struct{}

type FormError

type FormError struct {
	Title   string
	Message string
	State   *ConnUpsertResponse
}

func NewFormError

func NewFormError(title, message string, res *ConnUpsertResponse) FormError

func (FormError) Error

func (s FormError) Error() string

type FormState

type FormState struct {
	Name      string
	Type      string
	Settings  map[string]any
	RequestID string
}

type GetDestinationRequest

type GetDestinationRequest struct {
	DestID uint
}

type GetDestinationResponse

type GetDestinationResponse struct {
	Destination config.Destination
	TypeDisplay string
	FormFields  []util.Form
	RequestID   string
}

type HomeRequest

type HomeRequest struct {
}

type HomeResponse

type HomeResponse struct {
	Dests []config.Destination
}

type Middleware

type Middleware func(http.Handler) http.Handler

type NewKeyRequest

type NewKeyRequest struct {
	DestID uint
}

type NewKeyResponse

type NewKeyResponse struct {
	APIKey string
	APIURL string
}

type Service

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

func NewService

func NewService(
	c config.DashboardConfig,
	storageServices *storage.Services,
	destManager *destinations.DestinationManager,
) *Service

func (*Service) ConnRequest

func (s *Service) ConnRequest(ctx context.Context, r *ConnRequestRequest) (*ConnRequestResponse, error)

func (*Service) ConnUpsert

func (s *Service) ConnUpsert(ctx context.Context, req *ConnUpsertRequest) (*ConnUpsertResponse, error)

func (*Service) DeleteDestination

func (*Service) GetDestination

func (*Service) Home

func (s *Service) Home(ctx context.Context, r *HomeRequest) (*HomeResponse, error)

func (*Service) NewKey

func (s *Service) NewKey(ctx context.Context, r *NewKeyRequest) (*NewKeyResponse, error)

func (*Service) UpdateConnection

func (s *Service) UpdateConnection(ctx context.Context, r *UpdateConnectionRequest) (*ConnUpsertResponse, error)

func (*Service) ValidateRequestId

func (s *Service) ValidateRequestId(c context.Context, requestId string) (models.ConnectionRequest, error)

func (*Service) VerifyRequest

type UpdateConnectionRequest

type UpdateConnectionRequest struct {
	RequestID string
	Req       *ConnUpsertRequest
}

type UpdateConnectionResponse

type UpdateConnectionResponse struct {
}

type VerifyRequestRequest

type VerifyRequestRequest struct {
	RequestID string
}

type VerifyRequestResponse

type VerifyRequestResponse struct {
}

Jump to

Keyboard shortcuts

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