util

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2020 License: MIT Imports: 11 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 added in v0.2.9

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

func GetTLSConfig added in v0.3.0

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

Types

This section is empty.

Jump to

Keyboard shortcuts

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