management

package
v0.0.0-...-963ac0d Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: GPL-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppBerrypostManagementInvokePreferTarget = "app.berrypost.management.invoke.prefer.target"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Common

type Common struct {
	Annotation map[string]string `json:"annotation"`
}

type GetPackageRequest

type GetPackageRequest struct {
	PackageName string
}

type GetProtoFileRequest

type GetProtoFileRequest struct {
	ImportPath string
}

type InvokePage

type InvokePage struct {
	Meta                 server.ServerMeta
	ServiceIdentifier    string
	PackageName          string
	PreferTarget         string
	Services             []*Service
	ProtoFiles           []*ProtoFileMeta
	InvokePageURLBuilder func(string, string) string
	DefaultGRPCMetadata  []*MetadataItem
	Metadata             metadata.Metadata
	KnownReferences      []*ReferenceItem
}

type Management

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

func New

func New(opts ...Option) *Management

func (Management) Meta

func (m Management) Meta() map[string]string

func (Management) Name

func (m Management) Name() string

func (Management) Setup

func (m Management) Setup(s *server.Server) error

type MetadataItem

type MetadataItem struct {
	Key   string
	Value string
}

type Method

type Method struct {
	Name           string
	GRPCMethodName string
	InputSchema    string
	ServiceMethod  string
}

type Option

type Option func(*Management)

func SetProtoManager

func SetProtoManager(in ProtoManager) Option

type PackageMeta

type PackageMeta struct {
	Meta    ProtoMeta `json:"meta"`
	Package string    `json:"package"`
}

type ProtoFileMeta

type ProtoFileMeta struct {
	Filename string    `json:"filename"`
	Meta     ProtoMeta `json:"meta"`
}

type ProtoFileProfile

type ProtoFileProfile struct {
	Common       Common        `json:"common"`
	ProtoPackage *ProtoPackage `json:"proto_package"`
}

type ProtoManager

type ProtoManager interface {
	ListPackages(context.Context) ([]*PackageMeta, error)
	GetPackage(context.Context, *GetPackageRequest) (*ProtoPackageProfile, error)
	ListServiceAlias(context.Context) ([]*ServiceAlias, error)
	ListProtoFiles(context.Context) ([]*ProtoFileMeta, error)
	GetProtoFile(context.Context, *GetProtoFileRequest) (*ProtoFileProfile, error)
}

type ProtoMeta

type ProtoMeta struct {
	ImportPath string `json:"import_path"`
}

type ProtoPackage

type ProtoPackage struct {
	Meta           ProtoMeta            `json:"meta"`
	Files          []string             `json:"files"`
	FileDescriptor *protoregistry.Files `json:"file_descriptor"`
}

func (*ProtoPackage) MarshalJSON

func (pp *ProtoPackage) MarshalJSON() ([]byte, error)

type ProtoPackageProfile

type ProtoPackageProfile struct {
	Common     Common              `json:"common"`
	ProtoFiles []*ProtoFileProfile `json:"proto_files"`
}

type ReferenceItem

type ReferenceItem struct {
	Name string
}

type RevisionManager

type RevisionManager interface {
	ResolveRevision(context.Context, string) (ProtoManager, error)
	ListKnownReferences(context.Context) ([]*ReferenceItem, error)
}

type Service

type Service struct {
	Name    string
	Methods []*Method
}

type ServiceAlias

type ServiceAlias struct {
	Package string   `json:"package"`
	Alias   []string `json:"alias"`
}

Jump to

Keyboard shortcuts

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