internal

package
v0.0.0-...-2d1ab9f Latest Latest
Warning

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

Go to latest
Published: Dec 9, 2024 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type API

type API struct {
	Metadata Metadata          `yaml:"metadata"`
	Models   map[string]*Model `yaml:"models"`
}

type Contact

type Contact struct {
	Email string `yaml:"email"`
}

type CreateOperation

type CreateOperation struct {
	Permissions     []Permission `yaml:"permissions"`
	Transactional   bool         `yaml:"transactional"`
	AllowExplicitID bool         `yaml:"allowExplicitID"`
}

type DeleteOperation

type DeleteOperation struct {
	Permissions   []Permission `yaml:"permissions"`
	Transactional bool         `yaml:"transactional"`
}

type GenerateClientAction

type GenerateClientAction struct {
	APIFile string `flag:"true" required:"true"`
}

func (*GenerateClientAction) Run

type GenerateServerAction

type GenerateServerAction struct {
	APIFile string `flag:"true" required:"true"`
}

func (*GenerateServerAction) Run

type GetOperation

type GetOperation struct {
	Permissions   []Permission `yaml:"permissions"`
	Parameters    []Property   `yaml:"parameters"`
	Transactional bool         `yaml:"transactional"`
}

func (*GetOperation) UnmarshalYAML

func (l *GetOperation) UnmarshalYAML(unmarshal func(interface{}) error) error

type ListOperation

type ListOperation struct {
	Permissions      []Permission `yaml:"permissions"`
	Transactional    bool         `yaml:"transactional"`
	FilterProperties []Property   `yaml:"filterProperties"`
}

func (*ListOperation) UnmarshalYAML

func (l *ListOperation) UnmarshalYAML(unmarshal func(interface{}) error) error

type LogWriter

type LogWriter struct {
	Context context.Context
	Logger  *slog.Logger
	Level   slog.Level
	Args    []any
	// contains filtered or unexported fields
}

func (*LogWriter) Flush

func (lw *LogWriter) Flush() (n int, err error)

func (*LogWriter) Write

func (lw *LogWriter) Write(p []byte) (n int, err error)

type MergeOperation

type MergeOperation struct {
	Permissions        []Permission `yaml:"permissions"`
	Transactional      bool         `yaml:"transactional"`
	RequiredProperties []string     `yaml:"requiredProperties"`
}

type Metadata

type Metadata struct {
	Contact     Contact `yaml:"contact"`
	DisplayName string  `yaml:"displayName"`
	Description string  `yaml:"description"`
	Server      string  `yaml:"server"`
	Version     string  `yaml:"version"`
}

type Model

type Model struct {
	Name       string               `yaml:"-"`
	Scope      ModelScope           `yaml:"scope"`
	Path       string               `yaml:"path"`
	Properties map[string]*Property `yaml:"properties"`
	Create     *CreateOperation     `yaml:"create"`
	List       *ListOperation       `yaml:"list"`
	Get        *GetOperation        `yaml:"get"`
	Merge      *MergeOperation      `yaml:"merge"`
	Update     *UpdateOperation     `yaml:"update"`
	Delete     *DeleteOperation     `yaml:"delete"`
}

type ModelScope

type ModelScope string
const (
	ModelScopeGlobal ModelScope = "global"
	ModelScopeTenant ModelScope = "tenant"
)

type Permission

type Permission struct {
	Scope                  ModelScope `yaml:"scope"`
	Permission             string     `yaml:"permission"`
	TenantPathVariableName string     `yaml:"tenantPathVariableName"`
}

func (*Permission) UnmarshalYAML

func (l *Permission) UnmarshalYAML(unmarshal func(interface{}) error) error

type Property

type Property struct {
	Name              string `yaml:"name"`
	Type              string `yaml:"type"`
	Sortable          bool   `yaml:"sortable"`
	GoType            string `yaml:"goType"`
	TypeScriptType    string `yaml:"typeScriptType"`
	OpenAPIType       string `yaml:"oasType"`
	OpenAPITypeFormat string `yaml:"oasTypeFormat"`
	Optional          bool   `yaml:"optional"`
	ReadOnly          bool   `yaml:"readOnly"`
}

type UpdateOperation

type UpdateOperation struct {
	Permissions        []Permission `yaml:"permissions"`
	Transactional      bool         `yaml:"transactional"`
	RequiredProperties []string     `yaml:"requiredProperties"`
}

Jump to

Keyboard shortcuts

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