code.gitea.io/gitea@v1.22.3/modules/structs/variable.go (about)

     1  // Copyright 2024 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package structs
     5  
     6  // CreateVariableOption the option when creating variable
     7  // swagger:model
     8  type CreateVariableOption struct {
     9  	// Value of the variable to create
    10  	//
    11  	// required: true
    12  	Value string `json:"value" binding:"Required"`
    13  }
    14  
    15  // UpdateVariableOption the option when updating variable
    16  // swagger:model
    17  type UpdateVariableOption struct {
    18  	// New name for the variable. If the field is empty, the variable name won't be updated.
    19  	Name string `json:"name"`
    20  	// Value of the variable to update
    21  	//
    22  	// required: true
    23  	Value string `json:"value" binding:"Required"`
    24  }
    25  
    26  // ActionVariable return value of the query API
    27  // swagger:model
    28  type ActionVariable struct {
    29  	// the owner to which the variable belongs
    30  	OwnerID int64 `json:"owner_id"`
    31  	// the repository to which the variable belongs
    32  	RepoID int64 `json:"repo_id"`
    33  	// the name of the variable
    34  	Name string `json:"name"`
    35  	// the value of the variable
    36  	Data string `json:"data"`
    37  }