autogits/bots-common/gitea-generated/models/markdown_option.go

69 lines
1.5 KiB
Go
Raw Normal View History

2024-07-07 21:08:41 +02:00
// Code generated by go-swagger; DO NOT EDIT.
package models
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"context"
"github.com/go-openapi/strfmt"
"github.com/go-openapi/swag"
)
// MarkdownOption MarkdownOption markdown options
//
// swagger:model MarkdownOption
type MarkdownOption struct {
// URL path for rendering issue, media and file links
// Expected format: /subpath/{user}/{repo}/src/{branch, commit, tag}/{identifier/path}/{file/dir}
//
// in: body
Context string `json:"Context,omitempty"`
// Mode to render (comment, gfm, markdown)
//
// in: body
Mode string `json:"Mode,omitempty"`
// Text markdown to render
//
// in: body
Text string `json:"Text,omitempty"`
// Is it a wiki page ?
//
// in: body
Wiki bool `json:"Wiki,omitempty"`
}
// Validate validates this markdown option
func (m *MarkdownOption) Validate(formats strfmt.Registry) error {
return nil
}
// ContextValidate validates this markdown option based on context it is used
func (m *MarkdownOption) ContextValidate(ctx context.Context, formats strfmt.Registry) error {
return nil
}
// MarshalBinary interface implementation
func (m *MarkdownOption) MarshalBinary() ([]byte, error) {
if m == nil {
return nil, nil
}
return swag.WriteJSON(m)
}
// UnmarshalBinary interface implementation
func (m *MarkdownOption) UnmarshalBinary(b []byte) error {
var res MarkdownOption
if err := swag.ReadJSON(b, &res); err != nil {
return err
}
*m = res
return nil
}