github.com/ActiveState/cli@v0.0.0-20240508170324-6801f60cd051/pkg/platform/api/graphql/request/vcs.go (about)

     1  package request
     2  
     3  import (
     4  	"github.com/go-openapi/strfmt"
     5  )
     6  
     7  func CheckpointByCommit(commitID strfmt.UUID) *checkpointByCommit {
     8  	return &checkpointByCommit{vars: map[string]interface{}{
     9  		"commit_id": commitID,
    10  	}}
    11  }
    12  
    13  type checkpointByCommit struct {
    14  	vars map[string]interface{}
    15  }
    16  
    17  func (p *checkpointByCommit) Query() string {
    18  	return `query ($commit_id: uuid!) {
    19  		vcs_checkpoints(where: {commit_id:{_eq: $commit_id}}) {
    20  		  commit_id
    21  		  namespace
    22  		  requirement
    23  		  version_constraint
    24  		  constraint_json
    25  		}
    26  		vcs_commits_by_pk(commit_id: $commit_id) {
    27  		  at_time
    28  		}
    29  	  }	  
    30  	  `
    31  }
    32  
    33  func (p *checkpointByCommit) Vars() (map[string]interface{}, error) {
    34  	return p.vars, nil
    35  }