singul

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2025 License: AGPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthenticateAppCli

func AuthenticateAppCli(appname string) error

func GetActionAIResponseWrapper

func GetActionAIResponseWrapper(ctx context.Context, input shuffle.QueryInput) ([]byte, error)

func GetActionFromLabel

func GetActionFromLabel(ctx context.Context, app shuffle.WorkflowApp, label string, fixLabels bool, fields []shuffle.Valuereplace, count int) (shuffle.WorkflowAppAction, shuffle.AppCategory, []string)

func GetAppOpenapi

func GetAppOpenapi(appname string) (openapi3.Swagger, error)

func GetLocalAuth

func GetLocalAuth() ([]shuffle.AppAuthenticationStorage, error)

func LocalizeAppscript

func LocalizeAppscript(appname string) (string, error)

func RunAction

func RunAction(ctx context.Context, value shuffle.CategoryAction, retries ...int) (string, error)

func RunActionWrapper

func RunActionWrapper(ctx context.Context, user shuffle.User, value shuffle.CategoryAction, resp http.ResponseWriter, request *http.Request) ([]byte, error)

func RunCategoryAction

func RunCategoryAction(resp http.ResponseWriter, request *http.Request)

1. Check the category, if it has the label in it 2. Get the app (openapi & app config) 3. Check if the label exists for the app in any action 4. Do the translation~ (workflow or direct) 5. Run app action/workflow 6. Return result from the app

func SetupRequirements

func SetupRequirements(requirementsPath string) error

func Setupvenv

func Setupvenv(appscriptFolder string) (string, error)

func StoreTranslationOutput

func StoreTranslationOutput(user shuffle.User, fieldHash string, parsedParameterMap map[string]interface{}, inputFieldMap map[string]interface{})

Types

type FakeResponseWriter

type FakeResponseWriter struct {
	HeaderMap   http.Header
	Body        bytes.Buffer
	StatusCode  int
	WroteHeader bool
}

For handling the function without changing ALL the resp.X functions

func NewFakeResponseWriter

func NewFakeResponseWriter() *FakeResponseWriter

func (*FakeResponseWriter) Header

func (f *FakeResponseWriter) Header() http.Header

func (*FakeResponseWriter) Write

func (f *FakeResponseWriter) Write(b []byte) (int, error)

func (*FakeResponseWriter) WriteHeader

func (f *FakeResponseWriter) WriteHeader(statusCode int)

Jump to

Keyboard shortcuts

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