api

package
v1.2.21 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: AGPL-3.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrForbidden = &apimodels.UnexpectedErrorStatusCode{
	StatusCode: http.StatusForbidden,
	Response:   apimodels.UnexpectedError{Error: "Forbidden"},
}
View Source
var ErrInternalServerError = &apimodels.UnexpectedErrorStatusCode{
	StatusCode: http.StatusInternalServerError,
	Response:   apimodels.UnexpectedError{Error: "internal server error"},
}
View Source
var ErrUnauthorized = &apimodels.UnexpectedErrorStatusCode{
	StatusCode: http.StatusUnauthorized,
	Response:   apimodels.UnexpectedError{Error: "Unauthorized"},
}

Functions

This section is empty.

Types

type API

type API struct {
	apimodels.UnimplementedHandler

	CreateBeatsSheetService CreateBeatsSheetService
	CreateLoglineService    CreateLoglineService

	ExpandBeatService    ExpandBeatService
	ExpandLoglineService ExpandLoglineService

	GenerateBeatsSheetService GenerateBeatsSheetService
	GenerateLoglinesService   GenerateLoglinesService

	ListBeatsSheetsService ListBeatsSheetsService
	ListLoglinesService    ListLoglinesService

	RegenerateBeatsService RegenerateBeatsService

	SelectBeatsSheetService SelectBeatsSheetService
	SelectLoglineService    SelectLoglineService

	JKClient     *jkApiModels.Client
	OpenAIClient *config.OpenAI
}

func (*API) CreateBeatsSheet

func (api *API) CreateBeatsSheet(
	ctx context.Context, req *apimodels.CreateBeatsSheetForm,
) (apimodels.CreateBeatsSheetRes, error)

func (*API) CreateLogline

func (api *API) CreateLogline(
	ctx context.Context, req *apimodels.CreateLoglineForm,
) (apimodels.CreateLoglineRes, error)

func (*API) ExpandBeat

func (api *API) ExpandBeat(ctx context.Context, req *apimodels.ExpandBeatForm) (apimodels.ExpandBeatRes, error)

func (*API) ExpandLogline

func (api *API) ExpandLogline(ctx context.Context, req *apimodels.LoglineIdea) (apimodels.ExpandLoglineRes, error)

func (*API) GenerateBeatsSheet

func (api *API) GenerateBeatsSheet(
	ctx context.Context, req *apimodels.GenerateBeatsSheetForm,
) (apimodels.GenerateBeatsSheetRes, error)

func (*API) GenerateLoglines

func (api *API) GenerateLoglines(
	ctx context.Context, req *apimodels.GenerateLoglinesForm,
) (apimodels.GenerateLoglinesRes, error)

func (*API) GetBeatsSheet

func (api *API) GetBeatsSheet(
	ctx context.Context, params apimodels.GetBeatsSheetParams,
) (apimodels.GetBeatsSheetRes, error)

func (*API) GetBeatsSheets

func (api *API) GetBeatsSheets(
	ctx context.Context, params apimodels.GetBeatsSheetsParams,
) (apimodels.GetBeatsSheetsRes, error)

func (*API) GetLogline

func (api *API) GetLogline(ctx context.Context, params apimodels.GetLoglineParams) (apimodels.GetLoglineRes, error)

func (*API) GetLoglines

func (api *API) GetLoglines(ctx context.Context, params apimodels.GetLoglinesParams) (apimodels.GetLoglinesRes, error)

func (*API) Healthcheck

func (api *API) Healthcheck(ctx context.Context) (apimodels.HealthcheckRes, error)

func (*API) NewError

func (api *API) NewError(ctx context.Context, err error) *apimodels.UnexpectedErrorStatusCode

func (*API) Ping

func (api *API) Ping(_ context.Context) (apimodels.PingRes, error)

func (*API) RegenerateBeats

func (api *API) RegenerateBeats(
	ctx context.Context, req *apimodels.RegenerateBeatsForm,
) (apimodels.RegenerateBeatsRes, error)

type CreateBeatsSheetService

type CreateBeatsSheetService interface {
	CreateBeatsSheet(ctx context.Context, request services.CreateBeatsSheetRequest) (*models.BeatsSheet, error)
}

type CreateLoglineService

type CreateLoglineService interface {
	CreateLogline(ctx context.Context, request services.CreateLoglineRequest) (*models.Logline, error)
}

type ExpandBeatService

type ExpandBeatService interface {
	ExpandBeat(ctx context.Context, request services.ExpandBeatRequest) (*models.Beat, error)
}

type ExpandLoglineService

type ExpandLoglineService interface {
	ExpandLogline(ctx context.Context, request services.ExpandLoglineRequest) (*models.LoglineIdea, error)
}

type GenerateBeatsSheetService

type GenerateBeatsSheetService interface {
	GenerateBeatsSheet(ctx context.Context, request services.GenerateBeatsSheetRequest) ([]models.Beat, error)
}

type GenerateLoglinesService

type GenerateLoglinesService interface {
	GenerateLoglines(ctx context.Context, request services.GenerateLoglinesRequest) ([]models.LoglineIdea, error)
}

type ListBeatsSheetsService

type ListBeatsSheetsService interface {
	ListBeatsSheets(ctx context.Context, request services.ListBeatsSheetsRequest) ([]*models.BeatsSheetPreview, error)
}

type ListLoglinesService

type ListLoglinesService interface {
	ListLoglines(ctx context.Context, request services.ListLoglinesRequest) ([]*models.LoglinePreview, error)
}

type RegenerateBeatsService

type RegenerateBeatsService interface {
	RegenerateBeats(ctx context.Context, request services.RegenerateBeatsRequest) ([]models.Beat, error)
}

type SecurityHandler

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

func NewSecurity

func NewSecurity(
	source authpkg.AuthenticateSource, permissions authconfig.Permissions,
) (*SecurityHandler, error)

func (*SecurityHandler) HandleBearerAuth

func (security *SecurityHandler) HandleBearerAuth(
	ctx context.Context, operationName apimodels.OperationName, auth apimodels.BearerAuth,
) (context.Context, error)

type SelectBeatsSheetService

type SelectBeatsSheetService interface {
	SelectBeatsSheet(ctx context.Context, request services.SelectBeatsSheetRequest) (*models.BeatsSheet, error)
}

type SelectLoglineService

type SelectLoglineService interface {
	SelectLogline(ctx context.Context, request services.SelectLoglineRequest) (*models.Logline, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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