contracts

package
v0.2.19 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const GlobalDefaultKey = "default"

GlobalDefaultKey is a constant string representing the global default key.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig interface {
	GetApp() *appv1.App
}

AppConfig defines the contract for a configuration that provides app information.

type Client

type Client interface{}

Client is a tagged interface that represents an instance of a client connection, such as *grpc.ClientConn. Since clients with different protocols (e.g. gRPC, HTTP) do not have a unified interface, We use an empty interface to provide flexibility, and the caller needs to make type assertions.

type ClientConfig

type ClientConfig interface {
	GetClients() *transportv1.Clients
}

ClientConfig defines the contract for a configuration that provides client information.

type Component

type Component interface{}

Component is a generic runtime component.

type ConfigObject

ConfigObject aggregates common configuration accessors.

type DataConfig

type DataConfig interface {
	GetData() *datav1.Data
}

DataConfig defines the contract for a configuration that provides data information.

type Dialectal

type Dialectal interface {
	GetDialect() string
}

Dialectal represents an object that specifies a database dialect.

type DiscoveryConfig

type DiscoveryConfig interface {
	GetDiscoveries() *discoveryv1.Discoveries
}

DiscoveryConfig defines the contract for a configuration that provides discovery information.

type Driver

type Driver interface {
	GetDriver() string
}

Driver represents an object that specifies a underlying driver.

type Encoder

type Encoder func(v any) ([]byte, error)

Encoder defines a function type for encoding a value into a byte slice.

type LoggerConfig

type LoggerConfig interface {
	GetLogger() *loggerv1.Logger
}

LoggerConfig defines the contract for a configuration that provides logger information.

type MiddlewareConfig

type MiddlewareConfig interface {
	GetMiddlewares() *middlewarev1.Middlewares
}

MiddlewareConfig defines the contract for a configuration that provides middleware information.

type Named

type Named interface {
	GetName() string
}

Named represents an object that has a unique name.

type Server

type Server interface {
	transport.Server
}

Server is the top-level abstraction for all service types within our framework. It is translated through the inline transport.Server, ensuring that any type that implements our Server interface, At the same time, it also automatically meets the requirements of Kratos App for transport.Server interface.

type ServerConfig

type ServerConfig interface {
	GetServers() *transportv1.Servers
}

ServerConfig defines the contract for a configuration that provides server information.

type Typed

type Typed interface {
	GetType() string
}

Typed represents an object that has a specific type or category.

Directories

Path Synopsis
Package broker defines a generic interface for a message broker.
Package broker defines a generic interface for a message broker.
Package storage defines the contracts for storage services.
Package storage defines the contracts for storage services.
database
Package database implements the functions, types, and contracts for the module.
Package database implements the functions, types, and contracts for the module.

Jump to

Keyboard shortcuts

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