Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary json tag annotation #2

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file
Failed to load files.

Always

Just for now

@@ -1,58 +1,55 @@
package client

import (
"cloud.google.com/go/firestore"
"net/http"
"time"

"cloud.google.com/go/firestore"
)

const FuzzitEndpoint = "https://app.fuzzit.dev"
const CacheFile = "/tmp/.fuzzit.cache"


type Target struct {
Name string `firestore:"target_name"`
}

type Job struct {
TargetId string `firestore:"target_id"`
Args string `firestore:"args"`
Type string `firestore:"type"`
Host string `firestore:"host"`
Revision string `firestore:"revision"`
Branch string `firestore:"branch"`
Parallelism uint16 `firestore:"parallelism"`
AsanOptions string `firestore:"asan_options"`
TargetId string `firestore:"target_id"`
Args string `firestore:"args"`
Type string `firestore:"type"`
Host string `firestore:"host"`
Revision string `firestore:"revision"`
Branch string `firestore:"branch"`
Parallelism uint16 `firestore:"parallelism"`
AsanOptions string `firestore:"asan_options"`
UbsanOptions string `firestore:"ubsan_options"`
}


// Internal struct
type job struct {
Completed uint16 `firestore:"completed"`
Status string `firestore:"status"`
Namespace string `firestore:"namespace"`
Completed uint16 `firestore:"completed"`
Status string `firestore:"status"`
Namespace string `firestore:"namespace"`
StartedAt time.Time `firestore:"started_at,serverTimestamp"`
OrgId string `firestore:"org_id"`
OrgId string `firestore:"org_id"`
Job
}


type fuzzitClient struct {
Org string
Namespace string
ApiKey string
CustomToken string
Kind string `json:"kind"`
IdToken string `json:"idToken"`
RefreshToken string `json:"refreshToken"`
ExpiresIn string `json:"expiresIn"`
LastRefresh int64
firestoreClient *firestore.Client `json:"-"`
httpClient *http.Client `json:"-"`
Org string
Namespace string
ApiKey string
CustomToken string
Kind string `json:"kind"`
IdToken string `json:"idToken"`
RefreshToken string `json:"refreshToken"`
ExpiresIn string `json:"expiresIn"`
LastRefresh int64
firestoreClient *firestore.Client
httpClient *http.Client
}


func NewFuzzitClient(apiKey string) *fuzzitClient {
c := &fuzzitClient{}
c.httpClient = &http.Client{Timeout: 60 * time.Second}
@@ -71,4 +68,3 @@ func LoadFuzzitFromCache() (*fuzzitClient, error) {

return c, nil
}

ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.