codegen

package
v0.1.1 Latest Latest
Warning

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

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

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

Types

type BearerAuth

type BearerAuth struct {
	Token string
}

func (*BearerAuth) GetToken

func (s *BearerAuth) GetToken() string

GetToken returns the value of Token.

func (*BearerAuth) SetToken

func (s *BearerAuth) SetToken(val string)

SetToken sets the value of Token.

type Beat

type Beat struct {
	// The key of the beat.
	Key string `json:"key"`
	// The title of the beat.
	Title string `json:"title"`
	// The content of the beat.
	Content string `json:"content"`
}

A beat is a single unit of a story, representing an action through a sequence of scenes. Ref: #/components/schemas/Beat

func (*Beat) Decode

func (s *Beat) Decode(d *jx.Decoder) error

Decode decodes Beat from json.

func (*Beat) Encode

func (s *Beat) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Beat) GetContent

func (s *Beat) GetContent() string

GetContent returns the value of Content.

func (*Beat) GetKey

func (s *Beat) GetKey() string

GetKey returns the value of Key.

func (*Beat) GetTitle

func (s *Beat) GetTitle() string

GetTitle returns the value of Title.

func (*Beat) MarshalJSON

func (s *Beat) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Beat) SetContent

func (s *Beat) SetContent(val string)

SetContent sets the value of Content.

func (*Beat) SetKey

func (s *Beat) SetKey(val string)

SetKey sets the value of Key.

func (*Beat) SetTitle

func (s *Beat) SetTitle(val string)

SetTitle sets the value of Title.

func (*Beat) UnmarshalJSON

func (s *Beat) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Beat) Validate

func (s *Beat) Validate() error

type BeatDefinition

type BeatDefinition struct {
	// The name of the beat.
	Name string `json:"name"`
	// The key of the beat.
	Key string `json:"key"`
	// The key points of the beat.
	KeyPoints []string `json:"keyPoints"`
	// The purpose of the beat.
	Purpose string `json:"purpose"`
	// The minimum number of scenes in the beat.
	MinScenes int `json:"minScenes"`
	// The maximum number of scenes in the beat.
	MaxScenes int `json:"maxScenes"`
}

A beat is a key event in a story that drives the plot forward. It is used to structure the story and ensure its coherence. A beat describes the content of a beat. Ref: #/components/schemas/BeatDefinition

func (*BeatDefinition) Decode

func (s *BeatDefinition) Decode(d *jx.Decoder) error

Decode decodes BeatDefinition from json.

func (*BeatDefinition) Encode

func (s *BeatDefinition) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BeatDefinition) GetKey

func (s *BeatDefinition) GetKey() string

GetKey returns the value of Key.

func (*BeatDefinition) GetKeyPoints

func (s *BeatDefinition) GetKeyPoints() []string

GetKeyPoints returns the value of KeyPoints.

func (*BeatDefinition) GetMaxScenes

func (s *BeatDefinition) GetMaxScenes() int

GetMaxScenes returns the value of MaxScenes.

func (*BeatDefinition) GetMinScenes

func (s *BeatDefinition) GetMinScenes() int

GetMinScenes returns the value of MinScenes.

func (*BeatDefinition) GetName

func (s *BeatDefinition) GetName() string

GetName returns the value of Name.

func (*BeatDefinition) GetPurpose

func (s *BeatDefinition) GetPurpose() string

GetPurpose returns the value of Purpose.

func (*BeatDefinition) MarshalJSON

func (s *BeatDefinition) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BeatDefinition) SetKey

func (s *BeatDefinition) SetKey(val string)

SetKey sets the value of Key.

func (*BeatDefinition) SetKeyPoints

func (s *BeatDefinition) SetKeyPoints(val []string)

SetKeyPoints sets the value of KeyPoints.

func (*BeatDefinition) SetMaxScenes

func (s *BeatDefinition) SetMaxScenes(val int)

SetMaxScenes sets the value of MaxScenes.

func (*BeatDefinition) SetMinScenes

func (s *BeatDefinition) SetMinScenes(val int)

SetMinScenes sets the value of MinScenes.

func (*BeatDefinition) SetName

func (s *BeatDefinition) SetName(val string)

SetName sets the value of Name.

func (*BeatDefinition) SetPurpose

func (s *BeatDefinition) SetPurpose(val string)

SetPurpose sets the value of Purpose.

func (*BeatDefinition) UnmarshalJSON

func (s *BeatDefinition) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*BeatDefinition) Validate

func (s *BeatDefinition) Validate() error

type BeatsSheet

type BeatsSheet struct {
	ID          BeatsSheetID `json:"id"`
	LoglineID   LoglineID    `json:"loglineID"`
	StoryPlanID StoryPlanID  `json:"storyPlanID"`
	Content     []Beat       `json:"content"`
	// The date and time at which the beats sheet was created.
	CreatedAt time.Time `json:"createdAt"`
}

A beats sheet is a detailed outline of a story, breaking it down into its individual beats. Ref: #/components/schemas/BeatsSheet

func (*BeatsSheet) Decode

func (s *BeatsSheet) Decode(d *jx.Decoder) error

Decode decodes BeatsSheet from json.

func (*BeatsSheet) Encode

func (s *BeatsSheet) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BeatsSheet) GetContent

func (s *BeatsSheet) GetContent() []Beat

GetContent returns the value of Content.

func (*BeatsSheet) GetCreatedAt

func (s *BeatsSheet) GetCreatedAt() time.Time

GetCreatedAt returns the value of CreatedAt.

func (*BeatsSheet) GetID

func (s *BeatsSheet) GetID() BeatsSheetID

GetID returns the value of ID.

func (*BeatsSheet) GetLoglineID

func (s *BeatsSheet) GetLoglineID() LoglineID

GetLoglineID returns the value of LoglineID.

func (*BeatsSheet) GetStoryPlanID

func (s *BeatsSheet) GetStoryPlanID() StoryPlanID

GetStoryPlanID returns the value of StoryPlanID.

func (*BeatsSheet) MarshalJSON

func (s *BeatsSheet) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BeatsSheet) SetContent

func (s *BeatsSheet) SetContent(val []Beat)

SetContent sets the value of Content.

func (*BeatsSheet) SetCreatedAt

func (s *BeatsSheet) SetCreatedAt(val time.Time)

SetCreatedAt sets the value of CreatedAt.

func (*BeatsSheet) SetID

func (s *BeatsSheet) SetID(val BeatsSheetID)

SetID sets the value of ID.

func (*BeatsSheet) SetLoglineID

func (s *BeatsSheet) SetLoglineID(val LoglineID)

SetLoglineID sets the value of LoglineID.

func (*BeatsSheet) SetStoryPlanID

func (s *BeatsSheet) SetStoryPlanID(val StoryPlanID)

SetStoryPlanID sets the value of StoryPlanID.

func (*BeatsSheet) UnmarshalJSON

func (s *BeatsSheet) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*BeatsSheet) Validate

func (s *BeatsSheet) Validate() error

type BeatsSheetID

type BeatsSheetID uuid.UUID

func (*BeatsSheetID) Decode

func (s *BeatsSheetID) Decode(d *jx.Decoder) error

Decode decodes BeatsSheetID from json.

func (BeatsSheetID) Encode

func (s BeatsSheetID) Encode(e *jx.Encoder)

Encode encodes BeatsSheetID as json.

func (BeatsSheetID) MarshalJSON

func (s BeatsSheetID) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BeatsSheetID) UnmarshalJSON

func (s *BeatsSheetID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type BeatsSheetPreview

type BeatsSheetPreview struct {
	ID BeatsSheetID `json:"id"`
	// The date and time at which the beats sheet was created.
	CreatedAt time.Time `json:"createdAt"`
}

Ref: #/components/schemas/BeatsSheetPreview

func (*BeatsSheetPreview) Decode

func (s *BeatsSheetPreview) Decode(d *jx.Decoder) error

Decode decodes BeatsSheetPreview from json.

func (*BeatsSheetPreview) Encode

func (s *BeatsSheetPreview) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*BeatsSheetPreview) GetCreatedAt

func (s *BeatsSheetPreview) GetCreatedAt() time.Time

GetCreatedAt returns the value of CreatedAt.

func (*BeatsSheetPreview) GetID

func (s *BeatsSheetPreview) GetID() BeatsSheetID

GetID returns the value of ID.

func (*BeatsSheetPreview) MarshalJSON

func (s *BeatsSheetPreview) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*BeatsSheetPreview) SetCreatedAt

func (s *BeatsSheetPreview) SetCreatedAt(val time.Time)

SetCreatedAt sets the value of CreatedAt.

func (*BeatsSheetPreview) SetID

func (s *BeatsSheetPreview) SetID(val BeatsSheetID)

SetID sets the value of ID.

func (*BeatsSheetPreview) UnmarshalJSON

func (s *BeatsSheetPreview) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Client

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

Client implements OAS client.

func NewClient

func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)

NewClient initializes new Client defined by OAS.

func (*Client) CreateBeatsSheet

func (c *Client) CreateBeatsSheet(ctx context.Context, request *CreateBeatsSheetForm) (CreateBeatsSheetRes, error)

CreateBeatsSheet invokes createBeatsSheet operation.

Create a new beats sheet for a logline, following a story plan.

PUT /beats-sheet

func (*Client) CreateLogline

func (c *Client) CreateLogline(ctx context.Context, request *CreateLoglineForm) (CreateLoglineRes, error)

CreateLogline invokes createLogline operation.

Create a new logline for a user.

PUT /logline

func (*Client) CreateStoryPlan

func (c *Client) CreateStoryPlan(ctx context.Context, request *CreateStoryPlanForm) (CreateStoryPlanRes, error)

CreateStoryPlan invokes createStoryPlan operation.

Create a new story plan.

PUT /story-plan

func (*Client) ExpandBeat

func (c *Client) ExpandBeat(ctx context.Context, request *ExpandBeatForm) (ExpandBeatRes, error)

ExpandBeat invokes expandBeat operation.

Add more details to a specific beat in a beats sheet.

POST /beats-sheet/expand

func (*Client) ExpandLogline

func (c *Client) ExpandLogline(ctx context.Context, request *LoglineIdea) (ExpandLoglineRes, error)

ExpandLogline invokes expandLogline operation.

Add more details to a logline idea.

POST /logline/expand

func (*Client) GenerateBeatsSheet

func (c *Client) GenerateBeatsSheet(ctx context.Context, request *GenerateBeatsSheetForm) (GenerateBeatsSheetRes, error)

GenerateBeatsSheet invokes generateBeatsSheet operation.

Generate a new beats sheet for a logline, following a story plan.

POST /beats-sheet/generate

func (*Client) GenerateLoglines

func (c *Client) GenerateLoglines(ctx context.Context, request *GenerateLoglinesForm) (GenerateLoglinesRes, error)

GenerateLoglines invokes generateLoglines operation.

Generate new loglines for a user.

POST /loglines/generate

func (*Client) GetBeatsSheet

func (c *Client) GetBeatsSheet(ctx context.Context, params GetBeatsSheetParams) (GetBeatsSheetRes, error)

GetBeatsSheet invokes getBeatsSheet operation.

Get a beats sheet.

GET /beats-sheet

func (*Client) GetBeatsSheets

func (c *Client) GetBeatsSheets(ctx context.Context, params GetBeatsSheetsParams) (GetBeatsSheetsRes, error)

GetBeatsSheets invokes getBeatsSheets operation.

Get all beats sheets for the current user.

GET /beats-sheets

func (*Client) GetLogline

func (c *Client) GetLogline(ctx context.Context, params GetLoglineParams) (GetLoglineRes, error)

GetLogline invokes getLogline operation.

Get a logline.

GET /logline

func (*Client) GetLoglines

func (c *Client) GetLoglines(ctx context.Context, params GetLoglinesParams) (GetLoglinesRes, error)

GetLoglines invokes getLoglines operation.

Get all loglines for the current user.

GET /loglines

func (*Client) GetStoryPlan

func (c *Client) GetStoryPlan(ctx context.Context, params GetStoryPlanParams) (GetStoryPlanRes, error)

GetStoryPlan invokes getStoryPlan operation.

Get a story plan.

GET /story-plan

func (*Client) GetStoryPlans

func (c *Client) GetStoryPlans(ctx context.Context, params GetStoryPlansParams) (GetStoryPlansRes, error)

GetStoryPlans invokes getStoryPlans operation.

Get all story plans.

GET /story-plans

func (*Client) Healthcheck

func (c *Client) Healthcheck(ctx context.Context) (HealthcheckRes, error)

Healthcheck invokes healthcheck operation.

Returns a detailed report of the health of the service, including every dependency.

GET /healthcheck

func (*Client) Ping

func (c *Client) Ping(ctx context.Context) (PingRes, error)

Ping invokes ping operation.

Check the status of the service. If the service is running, a successful response is returned.

GET /ping

func (*Client) RegenerateBeats

func (c *Client) RegenerateBeats(ctx context.Context, request *RegenerateBeatsForm) (RegenerateBeatsRes, error)

RegenerateBeats invokes regenerateBeats operation.

Regenerate the content of specific beats in a beats sheet.

POST /beats-sheet/regenerate

func (*Client) UpdateStoryPlan

func (c *Client) UpdateStoryPlan(ctx context.Context, request *UpdateStoryPlanForm) (UpdateStoryPlanRes, error)

UpdateStoryPlan invokes updateStoryPlan operation.

Update a story plan.

PATCH /story-plan

type ClientOption

type ClientOption interface {
	// contains filtered or unexported methods
}

ClientOption is client config option.

func WithClient

func WithClient(client ht.Client) ClientOption

WithClient specifies http client to use.

type CreateBeatsSheetForm

type CreateBeatsSheetForm struct {
	LoglineID   LoglineID   `json:"loglineID"`
	StoryPlanID StoryPlanID `json:"storyPlanID"`
	// The beats of the story, in order.
	Content []Beat `json:"content"`
}

Ref: #/components/schemas/CreateBeatsSheetForm

func (*CreateBeatsSheetForm) Decode

func (s *CreateBeatsSheetForm) Decode(d *jx.Decoder) error

Decode decodes CreateBeatsSheetForm from json.

func (*CreateBeatsSheetForm) Encode

func (s *CreateBeatsSheetForm) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateBeatsSheetForm) GetContent

func (s *CreateBeatsSheetForm) GetContent() []Beat

GetContent returns the value of Content.

func (*CreateBeatsSheetForm) GetLoglineID

func (s *CreateBeatsSheetForm) GetLoglineID() LoglineID

GetLoglineID returns the value of LoglineID.

func (*CreateBeatsSheetForm) GetStoryPlanID

func (s *CreateBeatsSheetForm) GetStoryPlanID() StoryPlanID

GetStoryPlanID returns the value of StoryPlanID.

func (*CreateBeatsSheetForm) MarshalJSON

func (s *CreateBeatsSheetForm) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateBeatsSheetForm) SetContent

func (s *CreateBeatsSheetForm) SetContent(val []Beat)

SetContent sets the value of Content.

func (*CreateBeatsSheetForm) SetLoglineID

func (s *CreateBeatsSheetForm) SetLoglineID(val LoglineID)

SetLoglineID sets the value of LoglineID.

func (*CreateBeatsSheetForm) SetStoryPlanID

func (s *CreateBeatsSheetForm) SetStoryPlanID(val StoryPlanID)

SetStoryPlanID sets the value of StoryPlanID.

func (*CreateBeatsSheetForm) UnmarshalJSON

func (s *CreateBeatsSheetForm) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateBeatsSheetForm) Validate

func (s *CreateBeatsSheetForm) Validate() error

type CreateBeatsSheetRes

type CreateBeatsSheetRes interface {
	// contains filtered or unexported methods
}

type CreateLoglineForm

type CreateLoglineForm struct {
	Slug Slug `json:"slug"`
	// The name of the logline.
	Name string `json:"name"`
	// The content of the logline.
	Content string `json:"content"`
}

Ref: #/components/schemas/CreateLoglineForm

func (*CreateLoglineForm) Decode

func (s *CreateLoglineForm) Decode(d *jx.Decoder) error

Decode decodes CreateLoglineForm from json.

func (*CreateLoglineForm) Encode

func (s *CreateLoglineForm) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateLoglineForm) GetContent

func (s *CreateLoglineForm) GetContent() string

GetContent returns the value of Content.

func (*CreateLoglineForm) GetName

func (s *CreateLoglineForm) GetName() string

GetName returns the value of Name.

func (*CreateLoglineForm) GetSlug

func (s *CreateLoglineForm) GetSlug() Slug

GetSlug returns the value of Slug.

func (*CreateLoglineForm) MarshalJSON

func (s *CreateLoglineForm) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateLoglineForm) SetContent

func (s *CreateLoglineForm) SetContent(val string)

SetContent sets the value of Content.

func (*CreateLoglineForm) SetName

func (s *CreateLoglineForm) SetName(val string)

SetName sets the value of Name.

func (*CreateLoglineForm) SetSlug

func (s *CreateLoglineForm) SetSlug(val Slug)

SetSlug sets the value of Slug.

func (*CreateLoglineForm) UnmarshalJSON

func (s *CreateLoglineForm) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateLoglineForm) Validate

func (s *CreateLoglineForm) Validate() error

type CreateLoglineRes

type CreateLoglineRes interface {
	// contains filtered or unexported methods
}

type CreateStoryPlanForm

type CreateStoryPlanForm struct {
	Slug Slug `json:"slug"`
	// The name of the story plan.
	Name string `json:"name"`
	// The description of the story plan.
	Description string `json:"description"`
	// The beats of the story plan.
	Beats []BeatDefinition `json:"beats"`
}

Ref: #/components/schemas/CreateStoryPlanForm

func (*CreateStoryPlanForm) Decode

func (s *CreateStoryPlanForm) Decode(d *jx.Decoder) error

Decode decodes CreateStoryPlanForm from json.

func (*CreateStoryPlanForm) Encode

func (s *CreateStoryPlanForm) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*CreateStoryPlanForm) GetBeats

func (s *CreateStoryPlanForm) GetBeats() []BeatDefinition

GetBeats returns the value of Beats.

func (*CreateStoryPlanForm) GetDescription

func (s *CreateStoryPlanForm) GetDescription() string

GetDescription returns the value of Description.

func (*CreateStoryPlanForm) GetName

func (s *CreateStoryPlanForm) GetName() string

GetName returns the value of Name.

func (*CreateStoryPlanForm) GetSlug

func (s *CreateStoryPlanForm) GetSlug() Slug

GetSlug returns the value of Slug.

func (*CreateStoryPlanForm) MarshalJSON

func (s *CreateStoryPlanForm) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*CreateStoryPlanForm) SetBeats

func (s *CreateStoryPlanForm) SetBeats(val []BeatDefinition)

SetBeats sets the value of Beats.

func (*CreateStoryPlanForm) SetDescription

func (s *CreateStoryPlanForm) SetDescription(val string)

SetDescription sets the value of Description.

func (*CreateStoryPlanForm) SetName

func (s *CreateStoryPlanForm) SetName(val string)

SetName sets the value of Name.

func (*CreateStoryPlanForm) SetSlug

func (s *CreateStoryPlanForm) SetSlug(val Slug)

SetSlug sets the value of Slug.

func (*CreateStoryPlanForm) UnmarshalJSON

func (s *CreateStoryPlanForm) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CreateStoryPlanForm) Validate

func (s *CreateStoryPlanForm) Validate() error

type CreateStoryPlanRes

type CreateStoryPlanRes interface {
	// contains filtered or unexported methods
}

type Dependency

type Dependency struct {
	// The name of the dependency.
	Name            string           `json:"name"`
	Status          DependencyStatus `json:"status"`
	AdditionalProps DependencyAdditional
}

Ref: #/components/schemas/Dependency

func (*Dependency) Decode

func (s *Dependency) Decode(d *jx.Decoder) error

Decode decodes Dependency from json.

func (*Dependency) Encode

func (s *Dependency) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Dependency) GetAdditionalProps

func (s *Dependency) GetAdditionalProps() DependencyAdditional

GetAdditionalProps returns the value of AdditionalProps.

func (*Dependency) GetName

func (s *Dependency) GetName() string

GetName returns the value of Name.

func (*Dependency) GetStatus

func (s *Dependency) GetStatus() DependencyStatus

GetStatus returns the value of Status.

func (*Dependency) MarshalJSON

func (s *Dependency) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Dependency) SetAdditionalProps

func (s *Dependency) SetAdditionalProps(val DependencyAdditional)

SetAdditionalProps sets the value of AdditionalProps.

func (*Dependency) SetName

func (s *Dependency) SetName(val string)

SetName sets the value of Name.

func (*Dependency) SetStatus

func (s *Dependency) SetStatus(val DependencyStatus)

SetStatus sets the value of Status.

func (*Dependency) UnmarshalJSON

func (s *Dependency) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Dependency) Validate

func (s *Dependency) Validate() error

type DependencyAdditional

type DependencyAdditional map[string]jx.Raw

func (*DependencyAdditional) Decode

func (s *DependencyAdditional) Decode(d *jx.Decoder) error

Decode decodes DependencyAdditional from json.

func (DependencyAdditional) Encode

func (s DependencyAdditional) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (DependencyAdditional) MarshalJSON

func (s DependencyAdditional) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*DependencyAdditional) UnmarshalJSON

func (s *DependencyAdditional) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type DependencyStatus

type DependencyStatus string

The status of a dependency. Ref: #/components/schemas/DependencyStatus

const (
	DependencyStatusUp      DependencyStatus = "up"
	DependencyStatusDown    DependencyStatus = "down"
	DependencyStatusUnknown DependencyStatus = "unknown"
)

func (DependencyStatus) AllValues

func (DependencyStatus) AllValues() []DependencyStatus

AllValues returns all DependencyStatus values.

func (*DependencyStatus) Decode

func (s *DependencyStatus) Decode(d *jx.Decoder) error

Decode decodes DependencyStatus from json.

func (DependencyStatus) Encode

func (s DependencyStatus) Encode(e *jx.Encoder)

Encode encodes DependencyStatus as json.

func (DependencyStatus) MarshalJSON

func (s DependencyStatus) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (DependencyStatus) MarshalText

func (s DependencyStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*DependencyStatus) UnmarshalJSON

func (s *DependencyStatus) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*DependencyStatus) UnmarshalText

func (s *DependencyStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (DependencyStatus) Validate

func (s DependencyStatus) Validate() error

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ExpandBeatForm

type ExpandBeatForm struct {
	BeatsSheetID BeatsSheetID `json:"beatsSheetID"`
	// The key of the beat to expand.
	TargetKey string `json:"targetKey"`
}

Ref: #/components/schemas/ExpandBeatForm

func (*ExpandBeatForm) Decode

func (s *ExpandBeatForm) Decode(d *jx.Decoder) error

Decode decodes ExpandBeatForm from json.

func (*ExpandBeatForm) Encode

func (s *ExpandBeatForm) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*ExpandBeatForm) GetBeatsSheetID

func (s *ExpandBeatForm) GetBeatsSheetID() BeatsSheetID

GetBeatsSheetID returns the value of BeatsSheetID.

func (*ExpandBeatForm) GetTargetKey

func (s *ExpandBeatForm) GetTargetKey() string

GetTargetKey returns the value of TargetKey.

func (*ExpandBeatForm) MarshalJSON

func (s *ExpandBeatForm) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*ExpandBeatForm) SetBeatsSheetID

func (s *ExpandBeatForm) SetBeatsSheetID(val BeatsSheetID)

SetBeatsSheetID sets the value of BeatsSheetID.

func (*ExpandBeatForm) SetTargetKey

func (s *ExpandBeatForm) SetTargetKey(val string)

SetTargetKey sets the value of TargetKey.

func (*ExpandBeatForm) UnmarshalJSON

func (s *ExpandBeatForm) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ExpandBeatForm) Validate

func (s *ExpandBeatForm) Validate() error

type ExpandBeatRes

type ExpandBeatRes interface {
	// contains filtered or unexported methods
}

type ExpandLoglineRes

type ExpandLoglineRes interface {
	// contains filtered or unexported methods
}

type GenerateBeatsSheetForm

type GenerateBeatsSheetForm struct {
	LoglineID   LoglineID   `json:"loglineID"`
	StoryPlanID StoryPlanID `json:"storyPlanID"`
}

Ref: #/components/schemas/GenerateBeatsSheetForm

func (*GenerateBeatsSheetForm) Decode

func (s *GenerateBeatsSheetForm) Decode(d *jx.Decoder) error

Decode decodes GenerateBeatsSheetForm from json.

func (*GenerateBeatsSheetForm) Encode

func (s *GenerateBeatsSheetForm) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GenerateBeatsSheetForm) GetLoglineID

func (s *GenerateBeatsSheetForm) GetLoglineID() LoglineID

GetLoglineID returns the value of LoglineID.

func (*GenerateBeatsSheetForm) GetStoryPlanID

func (s *GenerateBeatsSheetForm) GetStoryPlanID() StoryPlanID

GetStoryPlanID returns the value of StoryPlanID.

func (*GenerateBeatsSheetForm) MarshalJSON

func (s *GenerateBeatsSheetForm) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GenerateBeatsSheetForm) SetLoglineID

func (s *GenerateBeatsSheetForm) SetLoglineID(val LoglineID)

SetLoglineID sets the value of LoglineID.

func (*GenerateBeatsSheetForm) SetStoryPlanID

func (s *GenerateBeatsSheetForm) SetStoryPlanID(val StoryPlanID)

SetStoryPlanID sets the value of StoryPlanID.

func (*GenerateBeatsSheetForm) UnmarshalJSON

func (s *GenerateBeatsSheetForm) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type GenerateBeatsSheetRes

type GenerateBeatsSheetRes interface {
	// contains filtered or unexported methods
}

type GenerateLoglinesForm

type GenerateLoglinesForm struct {
	// The number of loglines to generate.
	Count int `json:"count"`
	// The theme of the loglines to generate.
	Theme string `json:"theme"`
}

Ref: #/components/schemas/GenerateLoglinesForm

func (*GenerateLoglinesForm) Decode

func (s *GenerateLoglinesForm) Decode(d *jx.Decoder) error

Decode decodes GenerateLoglinesForm from json.

func (*GenerateLoglinesForm) Encode

func (s *GenerateLoglinesForm) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*GenerateLoglinesForm) GetCount

func (s *GenerateLoglinesForm) GetCount() int

GetCount returns the value of Count.

func (*GenerateLoglinesForm) GetTheme

func (s *GenerateLoglinesForm) GetTheme() string

GetTheme returns the value of Theme.

func (*GenerateLoglinesForm) MarshalJSON

func (s *GenerateLoglinesForm) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GenerateLoglinesForm) SetCount

func (s *GenerateLoglinesForm) SetCount(val int)

SetCount sets the value of Count.

func (*GenerateLoglinesForm) SetTheme

func (s *GenerateLoglinesForm) SetTheme(val string)

SetTheme sets the value of Theme.

func (*GenerateLoglinesForm) UnmarshalJSON

func (s *GenerateLoglinesForm) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GenerateLoglinesForm) Validate

func (s *GenerateLoglinesForm) Validate() error

type GenerateLoglinesOKApplicationJSON

type GenerateLoglinesOKApplicationJSON []LoglineIdea

func (*GenerateLoglinesOKApplicationJSON) Decode

Decode decodes GenerateLoglinesOKApplicationJSON from json.

func (GenerateLoglinesOKApplicationJSON) Encode

Encode encodes GenerateLoglinesOKApplicationJSON as json.

func (GenerateLoglinesOKApplicationJSON) MarshalJSON

func (s GenerateLoglinesOKApplicationJSON) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GenerateLoglinesOKApplicationJSON) UnmarshalJSON

func (s *GenerateLoglinesOKApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (GenerateLoglinesOKApplicationJSON) Validate

type GenerateLoglinesRes

type GenerateLoglinesRes interface {
	// contains filtered or unexported methods
}

type GetBeatsSheetParams

type GetBeatsSheetParams struct {
	// The unique identifier of the beats sheet.
	BeatsSheetID BeatsSheetID
}

GetBeatsSheetParams is parameters of getBeatsSheet operation.

type GetBeatsSheetRes

type GetBeatsSheetRes interface {
	// contains filtered or unexported methods
}

type GetBeatsSheetsOKApplicationJSON

type GetBeatsSheetsOKApplicationJSON []BeatsSheetPreview

func (*GetBeatsSheetsOKApplicationJSON) Decode

Decode decodes GetBeatsSheetsOKApplicationJSON from json.

func (GetBeatsSheetsOKApplicationJSON) Encode

Encode encodes GetBeatsSheetsOKApplicationJSON as json.

func (GetBeatsSheetsOKApplicationJSON) MarshalJSON

func (s GetBeatsSheetsOKApplicationJSON) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetBeatsSheetsOKApplicationJSON) UnmarshalJSON

func (s *GetBeatsSheetsOKApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (GetBeatsSheetsOKApplicationJSON) Validate

type GetBeatsSheetsParams

type GetBeatsSheetsParams struct {
	// The unique identifier of the logline.
	LoglineID LoglineID
	// The maximum number of items to return.
	Limit OptInt
	// The number of items to skip before starting to collect the result set.
	Offset OptInt
}

GetBeatsSheetsParams is parameters of getBeatsSheets operation.

type GetBeatsSheetsRes

type GetBeatsSheetsRes interface {
	// contains filtered or unexported methods
}

type GetLoglineParams

type GetLoglineParams struct {
	ID   OptLoglineID
	Slug OptSlug
}

GetLoglineParams is parameters of getLogline operation.

type GetLoglineRes

type GetLoglineRes interface {
	// contains filtered or unexported methods
}

type GetLoglinesOKApplicationJSON

type GetLoglinesOKApplicationJSON []LoglinePreview

func (*GetLoglinesOKApplicationJSON) Decode

Decode decodes GetLoglinesOKApplicationJSON from json.

func (GetLoglinesOKApplicationJSON) Encode

Encode encodes GetLoglinesOKApplicationJSON as json.

func (GetLoglinesOKApplicationJSON) MarshalJSON

func (s GetLoglinesOKApplicationJSON) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetLoglinesOKApplicationJSON) UnmarshalJSON

func (s *GetLoglinesOKApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (GetLoglinesOKApplicationJSON) Validate

func (s GetLoglinesOKApplicationJSON) Validate() error

type GetLoglinesParams

type GetLoglinesParams struct {
	// The maximum number of items to return.
	Limit OptInt
	// The number of items to skip before starting to collect the result set.
	Offset OptInt
}

GetLoglinesParams is parameters of getLoglines operation.

type GetLoglinesRes

type GetLoglinesRes interface {
	// contains filtered or unexported methods
}

type GetStoryPlanParams

type GetStoryPlanParams struct {
	ID   OptStoryPlanID
	Slug OptSlug
}

GetStoryPlanParams is parameters of getStoryPlan operation.

type GetStoryPlanRes

type GetStoryPlanRes interface {
	// contains filtered or unexported methods
}

type GetStoryPlansOKApplicationJSON

type GetStoryPlansOKApplicationJSON []StoryPlanPreview

func (*GetStoryPlansOKApplicationJSON) Decode

Decode decodes GetStoryPlansOKApplicationJSON from json.

func (GetStoryPlansOKApplicationJSON) Encode

Encode encodes GetStoryPlansOKApplicationJSON as json.

func (GetStoryPlansOKApplicationJSON) MarshalJSON

func (s GetStoryPlansOKApplicationJSON) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*GetStoryPlansOKApplicationJSON) UnmarshalJSON

func (s *GetStoryPlansOKApplicationJSON) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (GetStoryPlansOKApplicationJSON) Validate

type GetStoryPlansParams

type GetStoryPlansParams struct {
	// The maximum number of items to return.
	Limit OptInt
	// The number of items to skip before starting to collect the result set.
	Offset OptInt
}

GetStoryPlansParams is parameters of getStoryPlans operation.

type GetStoryPlansRes

type GetStoryPlansRes interface {
	// contains filtered or unexported methods
}

type Handler

type Handler interface {
	// CreateBeatsSheet implements createBeatsSheet operation.
	//
	// Create a new beats sheet for a logline, following a story plan.
	//
	// PUT /beats-sheet
	CreateBeatsSheet(ctx context.Context, req *CreateBeatsSheetForm) (CreateBeatsSheetRes, error)
	// CreateLogline implements createLogline operation.
	//
	// Create a new logline for a user.
	//
	// PUT /logline
	CreateLogline(ctx context.Context, req *CreateLoglineForm) (CreateLoglineRes, error)
	// CreateStoryPlan implements createStoryPlan operation.
	//
	// Create a new story plan.
	//
	// PUT /story-plan
	CreateStoryPlan(ctx context.Context, req *CreateStoryPlanForm) (CreateStoryPlanRes, error)
	// ExpandBeat implements expandBeat operation.
	//
	// Add more details to a specific beat in a beats sheet.
	//
	// POST /beats-sheet/expand
	ExpandBeat(ctx context.Context, req *ExpandBeatForm) (ExpandBeatRes, error)
	// ExpandLogline implements expandLogline operation.
	//
	// Add more details to a logline idea.
	//
	// POST /logline/expand
	ExpandLogline(ctx context.Context, req *LoglineIdea) (ExpandLoglineRes, error)
	// GenerateBeatsSheet implements generateBeatsSheet operation.
	//
	// Generate a new beats sheet for a logline, following a story plan.
	//
	// POST /beats-sheet/generate
	GenerateBeatsSheet(ctx context.Context, req *GenerateBeatsSheetForm) (GenerateBeatsSheetRes, error)
	// GenerateLoglines implements generateLoglines operation.
	//
	// Generate new loglines for a user.
	//
	// POST /loglines/generate
	GenerateLoglines(ctx context.Context, req *GenerateLoglinesForm) (GenerateLoglinesRes, error)
	// GetBeatsSheet implements getBeatsSheet operation.
	//
	// Get a beats sheet.
	//
	// GET /beats-sheet
	GetBeatsSheet(ctx context.Context, params GetBeatsSheetParams) (GetBeatsSheetRes, error)
	// GetBeatsSheets implements getBeatsSheets operation.
	//
	// Get all beats sheets for the current user.
	//
	// GET /beats-sheets
	GetBeatsSheets(ctx context.Context, params GetBeatsSheetsParams) (GetBeatsSheetsRes, error)
	// GetLogline implements getLogline operation.
	//
	// Get a logline.
	//
	// GET /logline
	GetLogline(ctx context.Context, params GetLoglineParams) (GetLoglineRes, error)
	// GetLoglines implements getLoglines operation.
	//
	// Get all loglines for the current user.
	//
	// GET /loglines
	GetLoglines(ctx context.Context, params GetLoglinesParams) (GetLoglinesRes, error)
	// GetStoryPlan implements getStoryPlan operation.
	//
	// Get a story plan.
	//
	// GET /story-plan
	GetStoryPlan(ctx context.Context, params GetStoryPlanParams) (GetStoryPlanRes, error)
	// GetStoryPlans implements getStoryPlans operation.
	//
	// Get all story plans.
	//
	// GET /story-plans
	GetStoryPlans(ctx context.Context, params GetStoryPlansParams) (GetStoryPlansRes, error)
	// Healthcheck implements healthcheck operation.
	//
	// Returns a detailed report of the health of the service, including every dependency.
	//
	// GET /healthcheck
	Healthcheck(ctx context.Context) (HealthcheckRes, error)
	// Ping implements ping operation.
	//
	// Check the status of the service. If the service is running, a successful response is returned.
	//
	// GET /ping
	Ping(ctx context.Context) (PingRes, error)
	// RegenerateBeats implements regenerateBeats operation.
	//
	// Regenerate the content of specific beats in a beats sheet.
	//
	// POST /beats-sheet/regenerate
	RegenerateBeats(ctx context.Context, req *RegenerateBeatsForm) (RegenerateBeatsRes, error)
	// UpdateStoryPlan implements updateStoryPlan operation.
	//
	// Update a story plan.
	//
	// PATCH /story-plan
	UpdateStoryPlan(ctx context.Context, req *UpdateStoryPlanForm) (UpdateStoryPlanRes, error)
	// NewError creates *UnexpectedErrorStatusCode from error returned by handler.
	//
	// Used for common default response.
	NewError(ctx context.Context, err error) *UnexpectedErrorStatusCode
}

Handler handles operations described by OpenAPI v3 specification.

type Health

type Health struct {
	Postgres Dependency `json:"postgres"`
}

Ref: #/components/schemas/Health

func (*Health) Decode

func (s *Health) Decode(d *jx.Decoder) error

Decode decodes Health from json.

func (*Health) Encode

func (s *Health) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Health) GetPostgres

func (s *Health) GetPostgres() Dependency

GetPostgres returns the value of Postgres.

func (*Health) MarshalJSON

func (s *Health) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Health) SetPostgres

func (s *Health) SetPostgres(val Dependency)

SetPostgres sets the value of Postgres.

func (*Health) UnmarshalJSON

func (s *Health) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Health) Validate

func (s *Health) Validate() error

type HealthcheckIMATeapot

type HealthcheckIMATeapot struct{}

HealthcheckIMATeapot is response for Healthcheck operation.

type HealthcheckRes

type HealthcheckRes interface {
	// contains filtered or unexported methods
}

type Invoker

type Invoker interface {
	// CreateBeatsSheet invokes createBeatsSheet operation.
	//
	// Create a new beats sheet for a logline, following a story plan.
	//
	// PUT /beats-sheet
	CreateBeatsSheet(ctx context.Context, request *CreateBeatsSheetForm) (CreateBeatsSheetRes, error)
	// CreateLogline invokes createLogline operation.
	//
	// Create a new logline for a user.
	//
	// PUT /logline
	CreateLogline(ctx context.Context, request *CreateLoglineForm) (CreateLoglineRes, error)
	// CreateStoryPlan invokes createStoryPlan operation.
	//
	// Create a new story plan.
	//
	// PUT /story-plan
	CreateStoryPlan(ctx context.Context, request *CreateStoryPlanForm) (CreateStoryPlanRes, error)
	// ExpandBeat invokes expandBeat operation.
	//
	// Add more details to a specific beat in a beats sheet.
	//
	// POST /beats-sheet/expand
	ExpandBeat(ctx context.Context, request *ExpandBeatForm) (ExpandBeatRes, error)
	// ExpandLogline invokes expandLogline operation.
	//
	// Add more details to a logline idea.
	//
	// POST /logline/expand
	ExpandLogline(ctx context.Context, request *LoglineIdea) (ExpandLoglineRes, error)
	// GenerateBeatsSheet invokes generateBeatsSheet operation.
	//
	// Generate a new beats sheet for a logline, following a story plan.
	//
	// POST /beats-sheet/generate
	GenerateBeatsSheet(ctx context.Context, request *GenerateBeatsSheetForm) (GenerateBeatsSheetRes, error)
	// GenerateLoglines invokes generateLoglines operation.
	//
	// Generate new loglines for a user.
	//
	// POST /loglines/generate
	GenerateLoglines(ctx context.Context, request *GenerateLoglinesForm) (GenerateLoglinesRes, error)
	// GetBeatsSheet invokes getBeatsSheet operation.
	//
	// Get a beats sheet.
	//
	// GET /beats-sheet
	GetBeatsSheet(ctx context.Context, params GetBeatsSheetParams) (GetBeatsSheetRes, error)
	// GetBeatsSheets invokes getBeatsSheets operation.
	//
	// Get all beats sheets for the current user.
	//
	// GET /beats-sheets
	GetBeatsSheets(ctx context.Context, params GetBeatsSheetsParams) (GetBeatsSheetsRes, error)
	// GetLogline invokes getLogline operation.
	//
	// Get a logline.
	//
	// GET /logline
	GetLogline(ctx context.Context, params GetLoglineParams) (GetLoglineRes, error)
	// GetLoglines invokes getLoglines operation.
	//
	// Get all loglines for the current user.
	//
	// GET /loglines
	GetLoglines(ctx context.Context, params GetLoglinesParams) (GetLoglinesRes, error)
	// GetStoryPlan invokes getStoryPlan operation.
	//
	// Get a story plan.
	//
	// GET /story-plan
	GetStoryPlan(ctx context.Context, params GetStoryPlanParams) (GetStoryPlanRes, error)
	// GetStoryPlans invokes getStoryPlans operation.
	//
	// Get all story plans.
	//
	// GET /story-plans
	GetStoryPlans(ctx context.Context, params GetStoryPlansParams) (GetStoryPlansRes, error)
	// Healthcheck invokes healthcheck operation.
	//
	// Returns a detailed report of the health of the service, including every dependency.
	//
	// GET /healthcheck
	Healthcheck(ctx context.Context) (HealthcheckRes, error)
	// Ping invokes ping operation.
	//
	// Check the status of the service. If the service is running, a successful response is returned.
	//
	// GET /ping
	Ping(ctx context.Context) (PingRes, error)
	// RegenerateBeats invokes regenerateBeats operation.
	//
	// Regenerate the content of specific beats in a beats sheet.
	//
	// POST /beats-sheet/regenerate
	RegenerateBeats(ctx context.Context, request *RegenerateBeatsForm) (RegenerateBeatsRes, error)
	// UpdateStoryPlan invokes updateStoryPlan operation.
	//
	// Update a story plan.
	//
	// PATCH /story-plan
	UpdateStoryPlan(ctx context.Context, request *UpdateStoryPlanForm) (UpdateStoryPlanRes, error)
}

Invoker invokes operations described by OpenAPI v3 specification.

type Labeler

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

Labeler is used to allow adding custom attributes to the server request metrics.

func LabelerFromContext

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

LabelerFromContext retrieves the Labeler from the provided context, if present.

If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.

func (*Labeler) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type Logline

type Logline struct {
	ID     LoglineID `json:"id"`
	UserID UserID    `json:"userID"`
	Slug   Slug      `json:"slug"`
	// The name of the logline.
	Name string `json:"name"`
	// The content of the logline.
	Content string `json:"content"`
	// The date and time at which the logline was created.
	CreatedAt time.Time `json:"createdAt"`
}

A logline is a brief summary of a story, used to quickly convey its essence. Ref: #/components/schemas/Logline

func (*Logline) Decode

func (s *Logline) Decode(d *jx.Decoder) error

Decode decodes Logline from json.

func (*Logline) Encode

func (s *Logline) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Logline) GetContent

func (s *Logline) GetContent() string

GetContent returns the value of Content.

func (*Logline) GetCreatedAt

func (s *Logline) GetCreatedAt() time.Time

GetCreatedAt returns the value of CreatedAt.

func (*Logline) GetID

func (s *Logline) GetID() LoglineID

GetID returns the value of ID.

func (*Logline) GetName

func (s *Logline) GetName() string

GetName returns the value of Name.

func (*Logline) GetSlug

func (s *Logline) GetSlug() Slug

GetSlug returns the value of Slug.

func (*Logline) GetUserID

func (s *Logline) GetUserID() UserID

GetUserID returns the value of UserID.

func (*Logline) MarshalJSON

func (s *Logline) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Logline) SetContent

func (s *Logline) SetContent(val string)

SetContent sets the value of Content.

func (*Logline) SetCreatedAt

func (s *Logline) SetCreatedAt(val time.Time)

SetCreatedAt sets the value of CreatedAt.

func (*Logline) SetID

func (s *Logline) SetID(val LoglineID)

SetID sets the value of ID.

func (*Logline) SetName

func (s *Logline) SetName(val string)

SetName sets the value of Name.

func (*Logline) SetSlug

func (s *Logline) SetSlug(val Slug)

SetSlug sets the value of Slug.

func (*Logline) SetUserID

func (s *Logline) SetUserID(val UserID)

SetUserID sets the value of UserID.

func (*Logline) UnmarshalJSON

func (s *Logline) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*Logline) Validate

func (s *Logline) Validate() error

type LoglineID

type LoglineID uuid.UUID

func (*LoglineID) Decode

func (s *LoglineID) Decode(d *jx.Decoder) error

Decode decodes LoglineID from json.

func (LoglineID) Encode

func (s LoglineID) Encode(e *jx.Encoder)

Encode encodes LoglineID as json.

func (LoglineID) MarshalJSON

func (s LoglineID) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LoglineID) UnmarshalJSON

func (s *LoglineID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type LoglineIdea

type LoglineIdea struct {
	// The title of the logline idea.
	Name string `json:"name"`
	// The content of the logline idea.
	Content string `json:"content"`
}

Ref: #/components/schemas/LoglineIdea

func (*LoglineIdea) Decode

func (s *LoglineIdea) Decode(d *jx.Decoder) error

Decode decodes LoglineIdea from json.

func (*LoglineIdea) Encode

func (s *LoglineIdea) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*LoglineIdea) GetContent

func (s *LoglineIdea) GetContent() string

GetContent returns the value of Content.

func (*LoglineIdea) GetName

func (s *LoglineIdea) GetName() string

GetName returns the value of Name.

func (*LoglineIdea) MarshalJSON

func (s *LoglineIdea) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LoglineIdea) SetContent

func (s *LoglineIdea) SetContent(val string)

SetContent sets the value of Content.

func (*LoglineIdea) SetName

func (s *LoglineIdea) SetName(val string)

SetName sets the value of Name.

func (*LoglineIdea) UnmarshalJSON

func (s *LoglineIdea) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*LoglineIdea) Validate

func (s *LoglineIdea) Validate() error

type LoglinePreview

type LoglinePreview struct {
	Slug Slug `json:"slug"`
	// The name of the logline.
	Name string `json:"name"`
	// The content of the logline.
	Content string `json:"content"`
	// The date and time at which the logline was created.
	CreatedAt time.Time `json:"createdAt"`
}

Ref: #/components/schemas/LoglinePreview

func (*LoglinePreview) Decode

func (s *LoglinePreview) Decode(d *jx.Decoder) error

Decode decodes LoglinePreview from json.

func (*LoglinePreview) Encode

func (s *LoglinePreview) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*LoglinePreview) GetContent

func (s *LoglinePreview) GetContent() string

GetContent returns the value of Content.

func (*LoglinePreview) GetCreatedAt

func (s *LoglinePreview) GetCreatedAt() time.Time

GetCreatedAt returns the value of CreatedAt.

func (*LoglinePreview) GetName

func (s *LoglinePreview) GetName() string

GetName returns the value of Name.

func (*LoglinePreview) GetSlug

func (s *LoglinePreview) GetSlug() Slug

GetSlug returns the value of Slug.

func (*LoglinePreview) MarshalJSON

func (s *LoglinePreview) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*LoglinePreview) SetContent

func (s *LoglinePreview) SetContent(val string)

SetContent sets the value of Content.

func (*LoglinePreview) SetCreatedAt

func (s *LoglinePreview) SetCreatedAt(val time.Time)

SetCreatedAt sets the value of CreatedAt.

func (*LoglinePreview) SetName

func (s *LoglinePreview) SetName(val string)

SetName sets the value of Name.

func (*LoglinePreview) SetSlug

func (s *LoglinePreview) SetSlug(val Slug)

SetSlug sets the value of Slug.

func (*LoglinePreview) UnmarshalJSON

func (s *LoglinePreview) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*LoglinePreview) Validate

func (s *LoglinePreview) Validate() error

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type NotFoundError

type NotFoundError struct {
	// The error message.
	Error string `json:"error"`
}

Ref: #/components/schemas/NotFoundError

func (*NotFoundError) Decode

func (s *NotFoundError) Decode(d *jx.Decoder) error

Decode decodes NotFoundError from json.

func (*NotFoundError) Encode

func (s *NotFoundError) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*NotFoundError) GetError

func (s *NotFoundError) GetError() string

GetError returns the value of Error.

func (*NotFoundError) MarshalJSON

func (s *NotFoundError) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*NotFoundError) SetError

func (s *NotFoundError) SetError(val string)

SetError sets the value of Error.

func (*NotFoundError) UnmarshalJSON

func (s *NotFoundError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	CreateBeatsSheetOperation   OperationName = "CreateBeatsSheet"
	CreateLoglineOperation      OperationName = "CreateLogline"
	CreateStoryPlanOperation    OperationName = "CreateStoryPlan"
	ExpandBeatOperation         OperationName = "ExpandBeat"
	ExpandLoglineOperation      OperationName = "ExpandLogline"
	GenerateBeatsSheetOperation OperationName = "GenerateBeatsSheet"
	GenerateLoglinesOperation   OperationName = "GenerateLoglines"
	GetBeatsSheetOperation      OperationName = "GetBeatsSheet"
	GetBeatsSheetsOperation     OperationName = "GetBeatsSheets"
	GetLoglineOperation         OperationName = "GetLogline"
	GetLoglinesOperation        OperationName = "GetLoglines"
	GetStoryPlanOperation       OperationName = "GetStoryPlan"
	GetStoryPlansOperation      OperationName = "GetStoryPlans"
	HealthcheckOperation        OperationName = "Healthcheck"
	PingOperation               OperationName = "Ping"
	RegenerateBeatsOperation    OperationName = "RegenerateBeats"
	UpdateStoryPlanOperation    OperationName = "UpdateStoryPlan"
)

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

type OptLoglineID

type OptLoglineID struct {
	Value LoglineID
	Set   bool
}

OptLoglineID is optional LoglineID.

func NewOptLoglineID

func NewOptLoglineID(v LoglineID) OptLoglineID

NewOptLoglineID returns new OptLoglineID with value set to v.

func (*OptLoglineID) Decode

func (o *OptLoglineID) Decode(d *jx.Decoder) error

Decode decodes LoglineID from json.

func (OptLoglineID) Encode

func (o OptLoglineID) Encode(e *jx.Encoder)

Encode encodes LoglineID as json.

func (OptLoglineID) Get

func (o OptLoglineID) Get() (v LoglineID, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptLoglineID) IsSet

func (o OptLoglineID) IsSet() bool

IsSet returns true if OptLoglineID was set.

func (OptLoglineID) MarshalJSON

func (s OptLoglineID) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptLoglineID) Or

Or returns value if set, or given parameter if does not.

func (*OptLoglineID) Reset

func (o *OptLoglineID) Reset()

Reset unsets value.

func (*OptLoglineID) SetTo

func (o *OptLoglineID) SetTo(v LoglineID)

SetTo sets value to v.

func (*OptLoglineID) UnmarshalJSON

func (s *OptLoglineID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptSlug

type OptSlug struct {
	Value Slug
	Set   bool
}

OptSlug is optional Slug.

func NewOptSlug

func NewOptSlug(v Slug) OptSlug

NewOptSlug returns new OptSlug with value set to v.

func (*OptSlug) Decode

func (o *OptSlug) Decode(d *jx.Decoder) error

Decode decodes Slug from json.

func (OptSlug) Encode

func (o OptSlug) Encode(e *jx.Encoder)

Encode encodes Slug as json.

func (OptSlug) Get

func (o OptSlug) Get() (v Slug, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptSlug) IsSet

func (o OptSlug) IsSet() bool

IsSet returns true if OptSlug was set.

func (OptSlug) MarshalJSON

func (s OptSlug) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptSlug) Or

func (o OptSlug) Or(d Slug) Slug

Or returns value if set, or given parameter if does not.

func (*OptSlug) Reset

func (o *OptSlug) Reset()

Reset unsets value.

func (*OptSlug) SetTo

func (o *OptSlug) SetTo(v Slug)

SetTo sets value to v.

func (*OptSlug) UnmarshalJSON

func (s *OptSlug) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptStoryPlanID

type OptStoryPlanID struct {
	Value StoryPlanID
	Set   bool
}

OptStoryPlanID is optional StoryPlanID.

func NewOptStoryPlanID

func NewOptStoryPlanID(v StoryPlanID) OptStoryPlanID

NewOptStoryPlanID returns new OptStoryPlanID with value set to v.

func (*OptStoryPlanID) Decode

func (o *OptStoryPlanID) Decode(d *jx.Decoder) error

Decode decodes StoryPlanID from json.

func (OptStoryPlanID) Encode

func (o OptStoryPlanID) Encode(e *jx.Encoder)

Encode encodes StoryPlanID as json.

func (OptStoryPlanID) Get

func (o OptStoryPlanID) Get() (v StoryPlanID, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptStoryPlanID) IsSet

func (o OptStoryPlanID) IsSet() bool

IsSet returns true if OptStoryPlanID was set.

func (OptStoryPlanID) MarshalJSON

func (s OptStoryPlanID) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptStoryPlanID) Or

Or returns value if set, or given parameter if does not.

func (*OptStoryPlanID) Reset

func (o *OptStoryPlanID) Reset()

Reset unsets value.

func (*OptStoryPlanID) SetTo

func (o *OptStoryPlanID) SetTo(v StoryPlanID)

SetTo sets value to v.

func (*OptStoryPlanID) UnmarshalJSON

func (s *OptStoryPlanID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type Option

type Option interface {
	ServerOption
	ClientOption
}

Option is config option.

func WithMeterProvider

func WithMeterProvider(provider metric.MeterProvider) Option

WithMeterProvider specifies a meter provider to use for creating a meter.

If none is specified, the otel.GetMeterProvider() is used.

func WithTracerProvider

func WithTracerProvider(provider trace.TracerProvider) Option

WithTracerProvider specifies a tracer provider to use for creating a tracer.

If none is specified, the global provider is used.

type PingIMATeapot

type PingIMATeapot struct{}

PingIMATeapot is response for Ping operation.

type PingOK

type PingOK struct {
	Data io.Reader
}

func (PingOK) Read

func (s PingOK) Read(p []byte) (n int, err error)

Read reads data from the Data reader.

Kept to satisfy the io.Reader interface.

type PingRes

type PingRes interface {
	// contains filtered or unexported methods
}

type RegenerateBeatsForm

type RegenerateBeatsForm struct {
	BeatsSheetID BeatsSheetID `json:"beatsSheetID"`
	// The keys of the beats to regenerate.
	RegenerateKeys []string `json:"regenerateKeys"`
}

Ref: #/components/schemas/RegenerateBeatsForm

func (*RegenerateBeatsForm) Decode

func (s *RegenerateBeatsForm) Decode(d *jx.Decoder) error

Decode decodes RegenerateBeatsForm from json.

func (*RegenerateBeatsForm) Encode

func (s *RegenerateBeatsForm) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*RegenerateBeatsForm) GetBeatsSheetID

func (s *RegenerateBeatsForm) GetBeatsSheetID() BeatsSheetID

GetBeatsSheetID returns the value of BeatsSheetID.

func (*RegenerateBeatsForm) GetRegenerateKeys

func (s *RegenerateBeatsForm) GetRegenerateKeys() []string

GetRegenerateKeys returns the value of RegenerateKeys.

func (*RegenerateBeatsForm) MarshalJSON

func (s *RegenerateBeatsForm) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*RegenerateBeatsForm) SetBeatsSheetID

func (s *RegenerateBeatsForm) SetBeatsSheetID(val BeatsSheetID)

SetBeatsSheetID sets the value of BeatsSheetID.

func (*RegenerateBeatsForm) SetRegenerateKeys

func (s *RegenerateBeatsForm) SetRegenerateKeys(val []string)

SetRegenerateKeys sets the value of RegenerateKeys.

func (*RegenerateBeatsForm) UnmarshalJSON

func (s *RegenerateBeatsForm) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*RegenerateBeatsForm) Validate

func (s *RegenerateBeatsForm) Validate() error

type RegenerateBeatsRes

type RegenerateBeatsRes interface {
	// contains filtered or unexported methods
}

type Route

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

Route is route object.

func (Route) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

type SecurityHandler

type SecurityHandler interface {
	// HandleBearerAuth handles bearerAuth security.
	HandleBearerAuth(ctx context.Context, operationName OperationName, t BearerAuth) (context.Context, error)
}

SecurityHandler is handler for security parameters.

type SecuritySource

type SecuritySource interface {
	// BearerAuth provides bearerAuth security value.
	BearerAuth(ctx context.Context, operationName OperationName) (BearerAuth, error)
}

SecuritySource is provider of security values (tokens, passwords, etc.).

type Server

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

Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.

func NewServer

func NewServer(h Handler, sec SecurityHandler, opts ...ServerOption) (*Server, error)

NewServer creates new Server.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

type ServerOption

type ServerOption interface {
	// contains filtered or unexported methods
}

ServerOption is server config option.

func WithErrorHandler

func WithErrorHandler(h ErrorHandler) ServerOption

WithErrorHandler specifies error handler to use.

func WithMaxMultipartMemory

func WithMaxMultipartMemory(max int64) ServerOption

WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.

func WithMethodNotAllowed

func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption

WithMethodNotAllowed specifies Method Not Allowed handler to use.

func WithMiddleware

func WithMiddleware(m ...Middleware) ServerOption

WithMiddleware specifies middlewares to use.

func WithNotFound

func WithNotFound(notFound http.HandlerFunc) ServerOption

WithNotFound specifies Not Found handler to use.

func WithPathPrefix

func WithPathPrefix(prefix string) ServerOption

WithPathPrefix specifies server path prefix.

type Slug

type Slug string

func (*Slug) Decode

func (s *Slug) Decode(d *jx.Decoder) error

Decode decodes Slug from json.

func (Slug) Encode

func (s Slug) Encode(e *jx.Encoder)

Encode encodes Slug as json.

func (Slug) MarshalJSON

func (s Slug) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Slug) UnmarshalJSON

func (s *Slug) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (Slug) Validate

func (s Slug) Validate() error

type StoryPlan

type StoryPlan struct {
	ID   StoryPlanID `json:"id"`
	Slug Slug        `json:"slug"`
	// The name of the story plan.
	Name string `json:"name"`
	// The description of the story plan.
	Description string `json:"description"`
	// The beats of the story plan.
	Beats []BeatDefinition `json:"beats"`
	// The date and time at which the story plan was created.
	CreatedAt time.Time `json:"createdAt"`
}

A story plan structures the output of the story schematics service. It describes the different beats of a story, controlling its final shape. Ref: #/components/schemas/StoryPlan

func (*StoryPlan) Decode

func (s *StoryPlan) Decode(d *jx.Decoder) error

Decode decodes StoryPlan from json.

func (*StoryPlan) Encode

func (s *StoryPlan) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*StoryPlan) GetBeats

func (s *StoryPlan) GetBeats() []BeatDefinition

GetBeats returns the value of Beats.

func (*StoryPlan) GetCreatedAt

func (s *StoryPlan) GetCreatedAt() time.Time

GetCreatedAt returns the value of CreatedAt.

func (*StoryPlan) GetDescription

func (s *StoryPlan) GetDescription() string

GetDescription returns the value of Description.

func (*StoryPlan) GetID

func (s *StoryPlan) GetID() StoryPlanID

GetID returns the value of ID.

func (*StoryPlan) GetName

func (s *StoryPlan) GetName() string

GetName returns the value of Name.

func (*StoryPlan) GetSlug

func (s *StoryPlan) GetSlug() Slug

GetSlug returns the value of Slug.

func (*StoryPlan) MarshalJSON

func (s *StoryPlan) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*StoryPlan) SetBeats

func (s *StoryPlan) SetBeats(val []BeatDefinition)

SetBeats sets the value of Beats.

func (*StoryPlan) SetCreatedAt

func (s *StoryPlan) SetCreatedAt(val time.Time)

SetCreatedAt sets the value of CreatedAt.

func (*StoryPlan) SetDescription

func (s *StoryPlan) SetDescription(val string)

SetDescription sets the value of Description.

func (*StoryPlan) SetID

func (s *StoryPlan) SetID(val StoryPlanID)

SetID sets the value of ID.

func (*StoryPlan) SetName

func (s *StoryPlan) SetName(val string)

SetName sets the value of Name.

func (*StoryPlan) SetSlug

func (s *StoryPlan) SetSlug(val Slug)

SetSlug sets the value of Slug.

func (*StoryPlan) UnmarshalJSON

func (s *StoryPlan) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StoryPlan) Validate

func (s *StoryPlan) Validate() error

type StoryPlanID

type StoryPlanID uuid.UUID

func (*StoryPlanID) Decode

func (s *StoryPlanID) Decode(d *jx.Decoder) error

Decode decodes StoryPlanID from json.

func (StoryPlanID) Encode

func (s StoryPlanID) Encode(e *jx.Encoder)

Encode encodes StoryPlanID as json.

func (StoryPlanID) MarshalJSON

func (s StoryPlanID) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*StoryPlanID) UnmarshalJSON

func (s *StoryPlanID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type StoryPlanPreview

type StoryPlanPreview struct {
	ID   StoryPlanID `json:"id"`
	Slug Slug        `json:"slug"`
	// The name of the story plan.
	Name string `json:"name"`
	// The description of the story plan.
	Description string `json:"description"`
	// The date and time at which the story plan was created.
	CreatedAt time.Time `json:"createdAt"`
}

Ref: #/components/schemas/StoryPlanPreview

func (*StoryPlanPreview) Decode

func (s *StoryPlanPreview) Decode(d *jx.Decoder) error

Decode decodes StoryPlanPreview from json.

func (*StoryPlanPreview) Encode

func (s *StoryPlanPreview) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*StoryPlanPreview) GetCreatedAt

func (s *StoryPlanPreview) GetCreatedAt() time.Time

GetCreatedAt returns the value of CreatedAt.

func (*StoryPlanPreview) GetDescription

func (s *StoryPlanPreview) GetDescription() string

GetDescription returns the value of Description.

func (*StoryPlanPreview) GetID

func (s *StoryPlanPreview) GetID() StoryPlanID

GetID returns the value of ID.

func (*StoryPlanPreview) GetName

func (s *StoryPlanPreview) GetName() string

GetName returns the value of Name.

func (*StoryPlanPreview) GetSlug

func (s *StoryPlanPreview) GetSlug() Slug

GetSlug returns the value of Slug.

func (*StoryPlanPreview) MarshalJSON

func (s *StoryPlanPreview) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*StoryPlanPreview) SetCreatedAt

func (s *StoryPlanPreview) SetCreatedAt(val time.Time)

SetCreatedAt sets the value of CreatedAt.

func (*StoryPlanPreview) SetDescription

func (s *StoryPlanPreview) SetDescription(val string)

SetDescription sets the value of Description.

func (*StoryPlanPreview) SetID

func (s *StoryPlanPreview) SetID(val StoryPlanID)

SetID sets the value of ID.

func (*StoryPlanPreview) SetName

func (s *StoryPlanPreview) SetName(val string)

SetName sets the value of Name.

func (*StoryPlanPreview) SetSlug

func (s *StoryPlanPreview) SetSlug(val Slug)

SetSlug sets the value of Slug.

func (*StoryPlanPreview) UnmarshalJSON

func (s *StoryPlanPreview) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*StoryPlanPreview) Validate

func (s *StoryPlanPreview) Validate() error

type UnauthorizedError added in v0.1.1

type UnauthorizedError struct {
	// The error message.
	Error string `json:"error"`
}

Ref: #/components/schemas/UnauthorizedError

func (*UnauthorizedError) Decode added in v0.1.1

func (s *UnauthorizedError) Decode(d *jx.Decoder) error

Decode decodes UnauthorizedError from json.

func (*UnauthorizedError) Encode added in v0.1.1

func (s *UnauthorizedError) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UnauthorizedError) GetError added in v0.1.1

func (s *UnauthorizedError) GetError() string

GetError returns the value of Error.

func (*UnauthorizedError) MarshalJSON added in v0.1.1

func (s *UnauthorizedError) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UnauthorizedError) SetError added in v0.1.1

func (s *UnauthorizedError) SetError(val string)

SetError sets the value of Error.

func (*UnauthorizedError) UnmarshalJSON added in v0.1.1

func (s *UnauthorizedError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnexpectedError

type UnexpectedError struct {
	// The error message.
	Error string `json:"error"`
}

Ref: #/components/schemas/UnexpectedError

func (*UnexpectedError) Decode

func (s *UnexpectedError) Decode(d *jx.Decoder) error

Decode decodes UnexpectedError from json.

func (*UnexpectedError) Encode

func (s *UnexpectedError) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UnexpectedError) GetError

func (s *UnexpectedError) GetError() string

GetError returns the value of Error.

func (*UnexpectedError) MarshalJSON

func (s *UnexpectedError) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UnexpectedError) SetError

func (s *UnexpectedError) SetError(val string)

SetError sets the value of Error.

func (*UnexpectedError) UnmarshalJSON

func (s *UnexpectedError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UnexpectedErrorStatusCode

type UnexpectedErrorStatusCode struct {
	StatusCode int
	Response   UnexpectedError
}

UnexpectedErrorStatusCode wraps UnexpectedError with StatusCode.

func (*UnexpectedErrorStatusCode) Error

func (s *UnexpectedErrorStatusCode) Error() string

func (*UnexpectedErrorStatusCode) GetResponse

func (s *UnexpectedErrorStatusCode) GetResponse() UnexpectedError

GetResponse returns the value of Response.

func (*UnexpectedErrorStatusCode) GetStatusCode

func (s *UnexpectedErrorStatusCode) GetStatusCode() int

GetStatusCode returns the value of StatusCode.

func (*UnexpectedErrorStatusCode) SetResponse

func (s *UnexpectedErrorStatusCode) SetResponse(val UnexpectedError)

SetResponse sets the value of Response.

func (*UnexpectedErrorStatusCode) SetStatusCode

func (s *UnexpectedErrorStatusCode) SetStatusCode(val int)

SetStatusCode sets the value of StatusCode.

type UnimplementedHandler

type UnimplementedHandler struct{}

UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.

func (UnimplementedHandler) CreateBeatsSheet

CreateBeatsSheet implements createBeatsSheet operation.

Create a new beats sheet for a logline, following a story plan.

PUT /beats-sheet

func (UnimplementedHandler) CreateLogline

CreateLogline implements createLogline operation.

Create a new logline for a user.

PUT /logline

func (UnimplementedHandler) CreateStoryPlan

CreateStoryPlan implements createStoryPlan operation.

Create a new story plan.

PUT /story-plan

func (UnimplementedHandler) ExpandBeat

ExpandBeat implements expandBeat operation.

Add more details to a specific beat in a beats sheet.

POST /beats-sheet/expand

func (UnimplementedHandler) ExpandLogline

func (UnimplementedHandler) ExpandLogline(ctx context.Context, req *LoglineIdea) (r ExpandLoglineRes, _ error)

ExpandLogline implements expandLogline operation.

Add more details to a logline idea.

POST /logline/expand

func (UnimplementedHandler) GenerateBeatsSheet

GenerateBeatsSheet implements generateBeatsSheet operation.

Generate a new beats sheet for a logline, following a story plan.

POST /beats-sheet/generate

func (UnimplementedHandler) GenerateLoglines

GenerateLoglines implements generateLoglines operation.

Generate new loglines for a user.

POST /loglines/generate

func (UnimplementedHandler) GetBeatsSheet

GetBeatsSheet implements getBeatsSheet operation.

Get a beats sheet.

GET /beats-sheet

func (UnimplementedHandler) GetBeatsSheets

GetBeatsSheets implements getBeatsSheets operation.

Get all beats sheets for the current user.

GET /beats-sheets

func (UnimplementedHandler) GetLogline

GetLogline implements getLogline operation.

Get a logline.

GET /logline

func (UnimplementedHandler) GetLoglines

GetLoglines implements getLoglines operation.

Get all loglines for the current user.

GET /loglines

func (UnimplementedHandler) GetStoryPlan

GetStoryPlan implements getStoryPlan operation.

Get a story plan.

GET /story-plan

func (UnimplementedHandler) GetStoryPlans

GetStoryPlans implements getStoryPlans operation.

Get all story plans.

GET /story-plans

func (UnimplementedHandler) Healthcheck

func (UnimplementedHandler) Healthcheck(ctx context.Context) (r HealthcheckRes, _ error)

Healthcheck implements healthcheck operation.

Returns a detailed report of the health of the service, including every dependency.

GET /healthcheck

func (UnimplementedHandler) NewError

NewError creates *UnexpectedErrorStatusCode from error returned by handler.

Used for common default response.

func (UnimplementedHandler) Ping

Ping implements ping operation.

Check the status of the service. If the service is running, a successful response is returned.

GET /ping

func (UnimplementedHandler) RegenerateBeats

RegenerateBeats implements regenerateBeats operation.

Regenerate the content of specific beats in a beats sheet.

POST /beats-sheet/regenerate

func (UnimplementedHandler) UpdateStoryPlan

UpdateStoryPlan implements updateStoryPlan operation.

Update a story plan.

PATCH /story-plan

type UnprocessableEntityError

type UnprocessableEntityError struct {
	// The error message.
	Error string `json:"error"`
}

Ref: #/components/schemas/UnprocessableEntityError

func (*UnprocessableEntityError) Decode

func (s *UnprocessableEntityError) Decode(d *jx.Decoder) error

Decode decodes UnprocessableEntityError from json.

func (*UnprocessableEntityError) Encode

func (s *UnprocessableEntityError) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UnprocessableEntityError) GetError

func (s *UnprocessableEntityError) GetError() string

GetError returns the value of Error.

func (*UnprocessableEntityError) MarshalJSON

func (s *UnprocessableEntityError) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UnprocessableEntityError) SetError

func (s *UnprocessableEntityError) SetError(val string)

SetError sets the value of Error.

func (*UnprocessableEntityError) UnmarshalJSON

func (s *UnprocessableEntityError) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type UpdateStoryPlanForm

type UpdateStoryPlanForm struct {
	Slug Slug `json:"slug"`
	// The name of the story plan.
	Name string `json:"name"`
	// The description of the story plan.
	Description string `json:"description"`
	// The beats of the story plan.
	Beats []BeatDefinition `json:"beats"`
}

Ref: #/components/schemas/UpdateStoryPlanForm

func (*UpdateStoryPlanForm) Decode

func (s *UpdateStoryPlanForm) Decode(d *jx.Decoder) error

Decode decodes UpdateStoryPlanForm from json.

func (*UpdateStoryPlanForm) Encode

func (s *UpdateStoryPlanForm) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*UpdateStoryPlanForm) GetBeats

func (s *UpdateStoryPlanForm) GetBeats() []BeatDefinition

GetBeats returns the value of Beats.

func (*UpdateStoryPlanForm) GetDescription

func (s *UpdateStoryPlanForm) GetDescription() string

GetDescription returns the value of Description.

func (*UpdateStoryPlanForm) GetName

func (s *UpdateStoryPlanForm) GetName() string

GetName returns the value of Name.

func (*UpdateStoryPlanForm) GetSlug

func (s *UpdateStoryPlanForm) GetSlug() Slug

GetSlug returns the value of Slug.

func (*UpdateStoryPlanForm) MarshalJSON

func (s *UpdateStoryPlanForm) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UpdateStoryPlanForm) SetBeats

func (s *UpdateStoryPlanForm) SetBeats(val []BeatDefinition)

SetBeats sets the value of Beats.

func (*UpdateStoryPlanForm) SetDescription

func (s *UpdateStoryPlanForm) SetDescription(val string)

SetDescription sets the value of Description.

func (*UpdateStoryPlanForm) SetName

func (s *UpdateStoryPlanForm) SetName(val string)

SetName sets the value of Name.

func (*UpdateStoryPlanForm) SetSlug

func (s *UpdateStoryPlanForm) SetSlug(val Slug)

SetSlug sets the value of Slug.

func (*UpdateStoryPlanForm) UnmarshalJSON

func (s *UpdateStoryPlanForm) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UpdateStoryPlanForm) Validate

func (s *UpdateStoryPlanForm) Validate() error

type UpdateStoryPlanRes

type UpdateStoryPlanRes interface {
	// contains filtered or unexported methods
}

type UserID

type UserID uuid.UUID

func (*UserID) Decode

func (s *UserID) Decode(d *jx.Decoder) error

Decode decodes UserID from json.

func (UserID) Encode

func (s UserID) Encode(e *jx.Encoder)

Encode encodes UserID as json.

func (UserID) MarshalJSON

func (s UserID) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*UserID) UnmarshalJSON

func (s *UserID) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

Jump to

Keyboard shortcuts

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