clientmeta

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Info

type Info struct {
	SchemaTypes        map[string]string
	SchemaFieldTypes   map[string]map[string]string
	ParamFieldTypes    map[string]map[string]string
	OptValueTypes      map[string]string
	ErrorResponseTypes map[string]map[int]string
	Operations         map[string]OperationMeta
}

Info contains normalized metadata extracted from ogen-generated client files.

func Load

func Load(clientDir string) (Info, error)

Load reads ogen metadata from the generated client directory.

func (Info) ClientType

func (i Info) ClientType(schemaName string) string

ClientType resolves schema name used by depsmith codegen to ogen client type name.

func (Info) ErrorType

func (i Info) ErrorType(opID string, status int, fallbackSchemaName string) string

ErrorType resolves concrete ogen response type for operation+status.

func (Info) Operation

func (i Info) Operation(method, path, fallbackName string) OperationMeta

Operation resolves ogen method name/return type by route.

func (Info) OptValueType

func (i Info) OptValueType(optType string) (string, bool)

OptValueType resolves value type carried by ogen Opt* wrapper.

func (Info) ParamFieldType

func (i Info) ParamFieldType(opID, fieldName, fallback string) string

ParamFieldType resolves concrete ogen field type for operation params struct field.

func (Info) SchemaFieldType

func (i Info) SchemaFieldType(schemaName, fieldName, fallback string) string

SchemaFieldType resolves concrete ogen field type for schema field.

type OperationMeta

type OperationMeta struct {
	Name        string
	RequestType string
	ReturnType  string
}

OperationMeta describes resolved ogen client operation metadata.

Jump to

Keyboard shortcuts

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