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

     1  // Copyright 2021 The Gitea Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package structs
     5  
     6  import "time"
     7  
     8  // CreatePushMirrorOption represents need information to create a push mirror of a repository.
     9  type CreatePushMirrorOption struct {
    10  	RemoteAddress  string `json:"remote_address"`
    11  	RemoteUsername string `json:"remote_username"`
    12  	RemotePassword string `json:"remote_password"`
    13  	Interval       string `json:"interval"`
    14  	SyncOnCommit   bool   `json:"sync_on_commit"`
    15  }
    16  
    17  // PushMirror represents information of a push mirror
    18  // swagger:model
    19  type PushMirror struct {
    20  	RepoName      string `json:"repo_name"`
    21  	RemoteName    string `json:"remote_name"`
    22  	RemoteAddress string `json:"remote_address"`
    23  	// swagger:strfmt date-time
    24  	CreatedUnix time.Time `json:"created"`
    25  	// swagger:strfmt date-time
    26  	LastUpdateUnix *time.Time `json:"last_update"`
    27  	LastError      string     `json:"last_error"`
    28  	Interval       string     `json:"interval"`
    29  	SyncOnCommit   bool       `json:"sync_on_commit"`
    30  }