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