github.com/filecoin-project/bacalhau@v0.3.23-0.20230228154132-45c989550ace/dashboard/api/pkg/types/types.go (about)

     1  package types
     2  
     3  import (
     4  	"time"
     5  
     6  	bacalhau_model "github.com/filecoin-project/bacalhau/pkg/model/v1beta1"
     7  )
     8  
     9  type LoginRequest struct {
    10  	Username string `json:"username"`
    11  	Password string `json:"password"`
    12  }
    13  
    14  type User struct {
    15  	ID             int       `json:"id"`
    16  	Created        time.Time `json:"created"`
    17  	Username       string    `json:"username"`
    18  	HashedPassword string
    19  }
    20  
    21  type Counter struct {
    22  	Count int `json:"count"`
    23  }
    24  
    25  type AnnotationSummary struct {
    26  	Annotation string `json:"annotation"`
    27  	Count      int    `json:"count"`
    28  }
    29  
    30  type JobMonthSummary struct {
    31  	Month string `json:"month"`
    32  	Count int    `json:"count"`
    33  }
    34  
    35  type JobExecutorSummary struct {
    36  	Executor string `json:"executor"`
    37  	Count    int    `json:"count"`
    38  }
    39  
    40  type JobModeration struct {
    41  	ID            int       `json:"id"`
    42  	JobID         string    `json:"job_id"`
    43  	UserAccountID int       `json:"user_account_id"`
    44  	Created       time.Time `json:"created"`
    45  	Status        string    `json:"status"`
    46  	Notes         string    `json:"notes"`
    47  }
    48  
    49  type JobModerationSummary struct {
    50  	Moderation *JobModeration `json:"moderation"`
    51  	User       *User          `json:"user"`
    52  }
    53  
    54  type JobInfo struct {
    55  	Job        bacalhau_model.Job               `json:"job"`
    56  	State      bacalhau_model.JobState          `json:"state"`
    57  	Events     []bacalhau_model.JobEvent        `json:"events"`
    58  	Results    []bacalhau_model.PublishedResult `json:"results"`
    59  	Moderation JobModerationSummary             `json:"moderation"`
    60  }