entopenapi

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package entopenapi contains interfaces for providing phronesis as an ent extension to be used for generating openapi specs with ent

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	SoftDeletes bool
}

func (Config) Name

func (c Config) Name() string

type ExtensionOption

type ExtensionOption = func(*OpenapiExtension)

func WithSoftDeletes

func WithSoftDeletes() ExtensionOption

WithSoftDeletes ensure the delete hook is still used even when soft deletes change the Op to Update

type OpenapiExtension

type OpenapiExtension struct {
	entc.DefaultExtension
	// contains filtered or unexported fields
}

OpenapiExtension implements entc.Extension.

func NewOpenapiExtension

func NewOpenapiExtension(opts ...ExtensionOption) *OpenapiExtension

NewOpenapiExtension creates a new fga extension

func (*OpenapiExtension) Annotations

func (e *OpenapiExtension) Annotations() []entc.Annotation

Annotations of the OpenapiExtension

func (*OpenapiExtension) Templates

func (e *OpenapiExtension) Templates() []*gen.Template

Templates returns the generated templates which include the client and authz from mutation

Jump to

Keyboard shortcuts

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