Documentation ¶
Index ¶
- Variables
- func Request(ctx context.Context, creds KeyProvider, p proto.Message) error
- func UserNameFromSignedMessage(signedMessage *SignedMessage) (string, error)
- func VerifyMessage(pubKey ed25519.PublicKey, signedMessage *SignedMessage) bool
- type KeyProvider
- type Register
- func (*Register) Descriptor() ([]byte, []int)deprecated
- func (x *Register) GetCurrentTime() *timestamppb.Timestamp
- func (x *Register) GetEmail() string
- func (x *Register) GetPublicKey() []byte
- func (x *Register) GetUserName() string
- func (*Register) ProtoMessage()
- func (x *Register) ProtoReflect() protoreflect.Message
- func (x *Register) Reset()
- func (x *Register) String() string
- type Reserve
- func (*Reserve) Descriptor() ([]byte, []int)deprecated
- func (x *Reserve) GetCurrentTime() *timestamppb.Timestamp
- func (x *Reserve) GetPath() string
- func (x *Reserve) GetUserName() string
- func (*Reserve) ProtoMessage()
- func (x *Reserve) ProtoReflect() protoreflect.Message
- func (x *Reserve) Reset()
- func (x *Reserve) String() string
- type SignedMessage
- func (*SignedMessage) Descriptor() ([]byte, []int)deprecated
- func (x *SignedMessage) GetMsg() *anypb.Any
- func (x *SignedMessage) GetSignature() []byte
- func (*SignedMessage) ProtoMessage()
- func (x *SignedMessage) ProtoReflect() protoreflect.Message
- func (x *SignedMessage) Reset()
- func (x *SignedMessage) String() string
- type Upload
- func (*Upload) Descriptor() ([]byte, []int)deprecated
- func (x *Upload) GetCurrentTime() *timestamppb.Timestamp
- func (x *Upload) GetGoModFile() []byte
- func (x *Upload) GetModPath() string
- func (x *Upload) GetUserName() string
- func (x *Upload) GetVersion() string
- func (x *Upload) GetZipFile() []byte
- func (*Upload) ProtoMessage()
- func (x *Upload) ProtoReflect() protoreflect.Message
- func (x *Upload) Reset()
- func (x *Upload) String() string
Constants ¶
This section is empty.
Variables ¶
View Source
var File_api_proto protoreflect.FileDescriptor
Functions ¶
func Request ¶ added in v0.0.5
Request performs an API request to the gopher.farm api server
func UserNameFromSignedMessage ¶
func UserNameFromSignedMessage(signedMessage *SignedMessage) (string, error)
func VerifyMessage ¶
func VerifyMessage(pubKey ed25519.PublicKey, signedMessage *SignedMessage) bool
Types ¶
type KeyProvider ¶
type KeyProvider interface {
PrivateKey() *ed25519.PrivateKey
}
type Register ¶
type Register struct { UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` PublicKey []byte `protobuf:"bytes,2,opt,name=public_key,json=publicKey,proto3" json:"public_key,omitempty"` CurrentTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=current_time,json=currentTime,proto3" json:"current_time,omitempty"` Email string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"` // contains filtered or unexported fields }
func (*Register) GetCurrentTime ¶
func (x *Register) GetCurrentTime() *timestamppb.Timestamp
func (*Register) ProtoReflect ¶
func (x *Register) ProtoReflect() protoreflect.Message
type Reserve ¶
type Reserve struct { UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` Path string `protobuf:"bytes,2,opt,name=path,proto3" json:"path,omitempty"` CurrentTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=current_time,json=currentTime,proto3" json:"current_time,omitempty"` // contains filtered or unexported fields }
func (*Reserve) GetCurrentTime ¶
func (x *Reserve) GetCurrentTime() *timestamppb.Timestamp
func (*Reserve) ProtoReflect ¶
func (x *Reserve) ProtoReflect() protoreflect.Message
type SignedMessage ¶
type SignedMessage struct { Msg *anypb.Any `protobuf:"bytes,1,opt,name=msg,proto3" json:"msg,omitempty"` Signature []byte `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` // contains filtered or unexported fields }
func SignMessage ¶
func SignMessage(kp KeyProvider, m proto.Message) (*SignedMessage, error)
func (*SignedMessage) Descriptor
deprecated
func (*SignedMessage) Descriptor() ([]byte, []int)
Deprecated: Use SignedMessage.ProtoReflect.Descriptor instead.
func (*SignedMessage) GetMsg ¶
func (x *SignedMessage) GetMsg() *anypb.Any
func (*SignedMessage) GetSignature ¶
func (x *SignedMessage) GetSignature() []byte
func (*SignedMessage) ProtoMessage ¶
func (*SignedMessage) ProtoMessage()
func (*SignedMessage) ProtoReflect ¶
func (x *SignedMessage) ProtoReflect() protoreflect.Message
func (*SignedMessage) Reset ¶
func (x *SignedMessage) Reset()
func (*SignedMessage) String ¶
func (x *SignedMessage) String() string
type Upload ¶
type Upload struct { UserName string `protobuf:"bytes,1,opt,name=user_name,json=userName,proto3" json:"user_name,omitempty"` ModPath string `protobuf:"bytes,2,opt,name=mod_path,json=modPath,proto3" json:"mod_path,omitempty"` CurrentTime *timestamppb.Timestamp `protobuf:"bytes,3,opt,name=current_time,json=currentTime,proto3" json:"current_time,omitempty"` Version string `protobuf:"bytes,4,opt,name=version,proto3" json:"version,omitempty"` ZipFile []byte `protobuf:"bytes,5,opt,name=zip_file,json=zipFile,proto3" json:"zip_file,omitempty"` GoModFile []byte `protobuf:"bytes,6,opt,name=go_mod_file,json=goModFile,proto3" json:"go_mod_file,omitempty"` // contains filtered or unexported fields }
func (*Upload) GetCurrentTime ¶
func (x *Upload) GetCurrentTime() *timestamppb.Timestamp
func (*Upload) ProtoReflect ¶
func (x *Upload) ProtoReflect() protoreflect.Message
Click to show internal directories.
Click to hide internal directories.