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

     1  // Copyright 2015 The Gogs Authors. All rights reserved.
     2  // SPDX-License-Identifier: MIT
     3  
     4  package structs
     5  
     6  // SearchResults results of a successful search
     7  type SearchResults struct {
     8  	OK   bool          `json:"ok"`
     9  	Data []*Repository `json:"data"`
    10  }
    11  
    12  // SearchError error of a failed search
    13  type SearchError struct {
    14  	OK    bool   `json:"ok"`
    15  	Error string `json:"error"`
    16  }
    17  
    18  // MarkdownOption markdown options
    19  type MarkdownOption struct {
    20  	// Text markdown to render
    21  	//
    22  	// in: body
    23  	Text string
    24  	// Mode to render
    25  	//
    26  	// in: body
    27  	Mode string
    28  	// Context to render
    29  	//
    30  	// in: body
    31  	Context string
    32  	// Is it a wiki page ?
    33  	//
    34  	// in: body
    35  	Wiki bool
    36  }
    37  
    38  // MarkdownRender is a rendered markdown document
    39  // swagger:response MarkdownRender
    40  type MarkdownRender string
    41  
    42  // ServerVersion wraps the version of the server
    43  type ServerVersion struct {
    44  	Version string `json:"version"`
    45  }
    46  
    47  // APIError is an api error with a message
    48  type APIError struct {
    49  	Message string `json:"message"`
    50  	URL     string `json:"url"`
    51  }