http autogen funcs
This commit is contained in:
parent
da9221ce34
commit
18796d1a47
3
http.go
3
http.go
|
@ -12,7 +12,6 @@ import (
|
|||
"strings"
|
||||
|
||||
"go.wit.com/lib/protobuf/gitpb"
|
||||
"go.wit.com/lib/protobuf/httppb"
|
||||
"go.wit.com/log"
|
||||
)
|
||||
|
||||
|
@ -104,6 +103,7 @@ func (f *Forge) UpdatePB(check *gitpb.Repos) (*gitpb.Repos, error) {
|
|||
return queryPB.SubmitReposPB(url)
|
||||
}
|
||||
|
||||
/*
|
||||
// HTTPRequestToProto converts an *http.Request to our custom HttpRequest protobuf message.
|
||||
func (pb *Patches) AddHttpToPB(r *http.Request) error {
|
||||
if pb == nil {
|
||||
|
@ -130,6 +130,7 @@ func (pb *Patches) AddHttpToPB(r *http.Request) error {
|
|||
// pb.HttpRequest.Route = cleanURL(r.URL.Path)
|
||||
return nil
|
||||
}
|
||||
*/
|
||||
|
||||
func getIpSimple(r *http.Request) string {
|
||||
host, _, err := net.SplitHostPort(r.RemoteAddr)
|
||||
|
|
|
@ -4,7 +4,6 @@ syntax = "proto3";
|
|||
|
||||
package forgepb;
|
||||
|
||||
import "go.wit.com/lib/protobuf/httppb/httpRequest.proto";
|
||||
import "google/protobuf/timestamp.proto"; // Import the well-known type for Timestamp
|
||||
|
||||
// Forge doesn't need this kind of specificity
|
||||
|
@ -64,7 +63,6 @@ message Patches { // `autogenpb:mars
|
|||
string uuid = 1; // `autogenpb:uuid:2679065e-c81d-4a00-aca4-03c158a834fb`
|
||||
string version = 2; // `autogenpb:version:v2.0.0`
|
||||
repeated Patch Patches = 3;
|
||||
httppb.HttpRequest httpRequest = 4; // who connected // rename httpRequest? This might make sense in our case
|
||||
string Error = 5; // when passing these around, if there is an error, store it here
|
||||
}
|
||||
message Patchset { // `autogenpb:marshal`
|
||||
|
|
Loading…
Reference in New Issue