util

package
v0.0.0-...-3852566 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Base64Decode

func Base64Decode(input string) ([]byte, error)

Base64Decode takes in a Base64 string and returns a byte array and an error

func Base64Encode

func Base64Encode(input []byte) string

Base64Encode takes in a byte array then returns an encoded base64 string

func GetSelfSignedTLSConfig

func GetSelfSignedTLSConfig(address string) (*tls.Config, error)

func GetTLSConfig

func GetTLSConfig(certFile string, keyFile string, caFile string, address string) (tlsConfig *tls.Config, err error)

func TimeToTimestamp

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

TimeToTimestamp returns a protobuf Timestamp from a Time object

func TimestampToTime

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

TimestampToTime returns a Time object from a protobuf Timestamp

func WithTLS

func WithTLS(t *tls.Config) micro.Option

Types

This section is empty.

Jump to

Keyboard shortcuts

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