convert

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package convert converts proto types to domain types and vice versa.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NamespaceFromPB

func NamespaceFromPB(pb *discoveryv1.Namespace) *discovery.Namespace

NamespaceFromPB converts *discovery.Namespace to *discoveryv1.Namespace.

func NamespaceToPB

func NamespaceToPB(n *discovery.Namespace) *discoveryv1.Namespace

NamespaceToPB converts *discovery.Namespace to *discoveryv1.Namespace.

func NamespacesFromPB

func NamespacesFromPB(s []*discoveryv1.Namespace) discovery.Namespaces

NamespacesFromPB converts slices *discoveryv1.Namespace discovery.Namespaces.

func NamespacesToPB

func NamespacesToPB(s discovery.Namespaces) []*discoveryv1.Namespace

NamespacesToPB converts discovery.Namespaces to slices of *discoveryv1.Namespace.

func ServerFromPB

func ServerFromPB(pb *discoveryv1.Server) *discovery.Server

ServerFromPB converts *discovery.Server to *discoveryv1.Server.

func ServerToPB

func ServerToPB(s *discovery.Server) *discoveryv1.Server

ServerToPB converts *discovery.Server to *discoveryv1.Server.

func ServersFromPB

func ServersFromPB(s []*discoveryv1.Server) discovery.Servers

ServersFromPB converts slices *discoveryv1.Server discovery.Servers.

func ServersToPB

func ServersToPB(s discovery.Servers) []*discoveryv1.Server

ServersToPB converts discovery.Servers to slices of *discoveryv1.Server.

func ServiceFromPB

func ServiceFromPB(pb *discoveryv1.Service) *discovery.Service

ServiceFromPB converts *discoveryv1.Service *discovery.Service.

func ServiceToPB

func ServiceToPB(s *discovery.Service) *discoveryv1.Service

ServiceToPB converts *discovery.Service to *discoveryv1.Service.

func ServicesFromPB

func ServicesFromPB(s []*discoveryv1.Service) discovery.Services

ServicesFromPB converts slice of *discoveryv1.Service to discovery.Services.

func ServicesToPB

func ServicesToPB(s discovery.Services) []*discoveryv1.Service

ServicesToPB converts discovery.Services to slice of *discoveryv1.Service.

func TimeFromPB

func TimeFromPB(ts *timestamp.Timestamp) time.Time

TimeFromPB converts protobuf timestamps to time.Time.

func TimeToPB

func TimeToPB(t *time.Time) *timestamp.Timestamp

TimeToPB converts time.Time to protobuf timestamps.

Types

This section is empty.

Jump to

Keyboard shortcuts

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