Documentation ¶
Overview ¶
Package convert converts proto types to domain types and vice versa.
Index ¶
- func NamespaceFromPB(pb *discoveryv1.Namespace) *discovery.Namespace
- func NamespaceToPB(n *discovery.Namespace) *discoveryv1.Namespace
- func NamespacesFromPB(s []*discoveryv1.Namespace) discovery.Namespaces
- func NamespacesToPB(s discovery.Namespaces) []*discoveryv1.Namespace
- func ServerFromPB(pb *discoveryv1.Server) *discovery.Server
- func ServerToPB(s *discovery.Server) *discoveryv1.Server
- func ServersFromPB(s []*discoveryv1.Server) discovery.Servers
- func ServersToPB(s discovery.Servers) []*discoveryv1.Server
- func ServiceFromPB(pb *discoveryv1.Service) *discovery.Service
- func ServiceToPB(s *discovery.Service) *discoveryv1.Service
- func ServicesFromPB(s []*discoveryv1.Service) discovery.Services
- func ServicesToPB(s discovery.Services) []*discoveryv1.Service
- func TimeFromPB(ts *timestamp.Timestamp) time.Time
- func TimeToPB(t *time.Time) *timestamp.Timestamp
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 ¶
TimeFromPB converts protobuf timestamps to time.Time.
Types ¶
This section is empty.