* Vendors packages * Adds a Makefile that uses docker to build a static binary against musl using alpine linux. Signed-off-by: Gabriel Adrian Samfira <gsamfira@cloudbasesolutions.com>
19 lines
503 B
Go
19 lines
503 B
Go
// Package macaroonpb defines the serialization details of macaroon ids
|
|
// used in the macaroon-bakery.
|
|
package macaroonpb
|
|
|
|
import (
|
|
"github.com/golang/protobuf/proto"
|
|
)
|
|
|
|
//go:generate protoc --go_out . id.proto
|
|
|
|
// MarshalBinary implements encoding.BinaryMarshal.
|
|
func (id *MacaroonId) MarshalBinary() ([]byte, error) {
|
|
return proto.Marshal(id)
|
|
}
|
|
|
|
// UnmarshalBinary implements encoding.UnmarshalBinary.
|
|
func (id *MacaroonId) UnmarshalBinary(data []byte) error {
|
|
return proto.Unmarshal(data, id)
|
|
}
|