code.gitea.io/gitea@v1.19.3/modules/structs/repo_key.go (about)

     1  // Copyright 2015 The Gogs Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package structs
     5  
     6  import (
     7  	"time"
     8  )
     9  
    10  // DeployKey a deploy key
    11  type DeployKey struct {
    12  	ID          int64  `json:"id"`
    13  	KeyID       int64  `json:"key_id"`
    14  	Key         string `json:"key"`
    15  	URL         string `json:"url"`
    16  	Title       string `json:"title"`
    17  	Fingerprint string `json:"fingerprint"`
    18  	// swagger:strfmt date-time
    19  	Created    time.Time   `json:"created_at"`
    20  	ReadOnly   bool        `json:"read_only"`
    21  	Repository *Repository `json:"repository,omitempty"`
    22  }
    23  
    24  // CreateKeyOption options when creating a key
    25  type CreateKeyOption struct {
    26  	// Title of the key to add
    27  	//
    28  	// required: true
    29  	// unique: true
    30  	Title string `json:"title" binding:"Required"`
    31  	// An armored SSH key to add
    32  	//
    33  	// required: true
    34  	// unique: true
    35  	Key string `json:"key" binding:"Required"`
    36  	// Describe if the key has only read access or read/write
    37  	//
    38  	// required: false
    39  	ReadOnly bool `json:"read_only"`
    40  }