protos

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2025 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FromProtosSlice

func FromProtosSlice[T any, S ProtoDestination[T]](t []*T, s []S) error

func FromProtosSliceFunc

func FromProtosSliceFunc[T any, S any](s []S, convert func(S) (*T, error)) ([]*T, error)

func FromProtosSliceFunc2

func FromProtosSliceFunc2[T any, S any](s []S, convert func(S) (T, error)) ([]T, error)

func ToProtosSlice

func ToProtosSlice[T any, S ProtoSource[T]](s []S) ([]*T, error)

func ToProtosSliceFunc

func ToProtosSliceFunc[T any, S any](s []S, convert func(S) (*T, error)) ([]*T, error)

Types

type ProtoDestination

type ProtoDestination[T any] interface {
	FromProtos(*T) error
}

type ProtoSource

type ProtoSource[T any] interface {
	ToProtos() (*T, error)
}

Jump to

Keyboard shortcuts

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