go-swagger: github.com/go-swagger/go-swagger/examples/task-tracker/models Index | Files

package models

import "github.com/go-swagger/go-swagger/examples/task-tracker/models"

Index

Package Files

comment.go error.go milestone.go task.go task_card.go user_card.go validation_error.go

Constants

const (

    // TaskCardStatusOpen captures enum value "open"
    TaskCardStatusOpen string = "open"

    // TaskCardStatusClosed captures enum value "closed"
    TaskCardStatusClosed string = "closed"

    // TaskCardStatusIgnored captures enum value "ignored"
    TaskCardStatusIgnored string = "ignored"

    // TaskCardStatusRejected captures enum value "rejected"
    TaskCardStatusRejected string = "rejected"
)

type Comment Uses

type Comment struct {

    // The content of the comment.
    //
    // This is a free text field with support for github flavored markdown.
    //
    // Required: true
    Content *string `json:"content"`

    // The time at which this comment was created.
    //
    // This field is autogenerated when the content is posted.
    // Read Only: true
    // Format: date-time
    CreatedAt strfmt.DateTime `json:"createdAt,omitempty"`

    // user
    // Required: true
    User *UserCard `json:"user"`
}

Comment A comment for an issue.

Users can comment on issues to discuss plans for resolution etc.

swagger:model Comment

func (*Comment) MarshalBinary Uses

func (m *Comment) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Comment) UnmarshalBinary Uses

func (m *Comment) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Comment) Validate Uses

func (m *Comment) Validate(formats strfmt.Registry) error

Validate validates this comment

type Error Uses

type Error struct {

    // the error code, this is not necessarily the http status code
    // Required: true
    Code *int32 `json:"code"`

    // an optional url for getting more help about this error
    // Format: uri
    HelpURL strfmt.URI `json:"helpUrl,omitempty"`

    // a human readable version of the error
    // Required: true
    Message *string `json:"message"`
}

Error Error Structure

Contains all the properties any error response from the API will contain. Some properties are optional so might be empty most of the time

swagger:model Error

func (*Error) MarshalBinary Uses

func (m *Error) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Error) UnmarshalBinary Uses

func (m *Error) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Error) Validate Uses

func (m *Error) Validate(formats strfmt.Registry) error

Validate validates this error

type Milestone Uses

type Milestone struct {

    // The description of the milestone.
    //
    // A description is a free text field that allows for a more detailed explanation of what the milestone is trying to achieve.
    //
    Description string `json:"description,omitempty"`

    // An optional due date for this milestone.
    //
    // This property is optional, but when present it lets people know when they can expect this milestone to be completed.
    //
    // Format: date
    DueDate strfmt.Date `json:"dueDate,omitempty"`

    // The name of the milestone.
    //
    // Each milestone should get a unique name.
    //
    // Required: true
    // Max Length: 50
    // Min Length: 3
    // Pattern: [A-Za-z][\w- ]+
    Name *string `json:"name"`

    // stats
    Stats *MilestoneStats `json:"stats,omitempty"`
}

Milestone A milestone is a particular goal that is important to the project for this issue tracker.

Milestones can have a escription and due date. This can be useful for filters and such.

swagger:model Milestone

func (*Milestone) MarshalBinary Uses

func (m *Milestone) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*Milestone) UnmarshalBinary Uses

func (m *Milestone) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Milestone) Validate Uses

func (m *Milestone) Validate(formats strfmt.Registry) error

Validate validates this milestone

type MilestoneStats Uses

type MilestoneStats struct {

    // The closed issues.
    Closed int32 `json:"closed,omitempty"`

    // The remaining open issues.
    Open int32 `json:"open,omitempty"`

    // The total number of issues for this milestone.
    Total int32 `json:"total,omitempty"`
}

MilestoneStats Some counters for this milestone.

This object contains counts for the remaining open issues and the amount of issues that have been closed.

swagger:model MilestoneStats

func (*MilestoneStats) MarshalBinary Uses

func (m *MilestoneStats) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*MilestoneStats) UnmarshalBinary Uses

func (m *MilestoneStats) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*MilestoneStats) Validate Uses

func (m *MilestoneStats) Validate(formats strfmt.Registry) error

Validate validates this milestone stats

type Task Uses

type Task struct {
    TaskCard

    // The attached files.
    //
    // An issue can have at most 20 files attached to it.
    //
    Attachments map[string]TaskAttachmentsAnon `json:"attachments,omitempty"`

    // The 5 most recent items for this issue.
    //
    // The detail view of an issue includes the 5 most recent comments.
    // This field is read only, comments are added through a separate process.
    //
    // Read Only: true
    Comments []*Comment `json:"comments"`

    // The time at which this issue was last updated.
    //
    // This field is read only so it's only sent as part of the response.
    //
    // Read Only: true
    // Format: date-time
    LastUpdated strfmt.DateTime `json:"lastUpdated,omitempty"`

    // last updated by
    LastUpdatedBy *UserCard `json:"lastUpdatedBy,omitempty"`

    // reported by
    ReportedBy *UserCard `json:"reportedBy,omitempty"`
}

Task a structure describing a complete task.

A Task is the main entity in this application. Everything revolves around tasks and managing them.

swagger:model Task

func (*Task) MarshalBinary Uses

func (m *Task) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (Task) MarshalJSON Uses

func (m Task) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object to a JSON structure

func (*Task) UnmarshalBinary Uses

func (m *Task) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*Task) UnmarshalJSON Uses

func (m *Task) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object from a JSON structure

func (*Task) Validate Uses

func (m *Task) Validate(formats strfmt.Registry) error

Validate validates this task

type TaskAttachmentsAnon Uses

type TaskAttachmentsAnon struct {

    // The content type of the file.
    //
    // The content type of the file is inferred from the upload request.
    //
    // Read Only: true
    ContentType string `json:"contentType,omitempty"`

    // Extra information to attach to the file.
    //
    // This is a free form text field with support for github flavored markdown.
    //
    // Min Length: 3
    Description string `json:"description,omitempty"`

    // The name of the file.
    //
    // This name is inferred from the upload request.
    //
    // Read Only: true
    Name string `json:"name,omitempty"`

    // The file size in bytes.
    //
    // This property was generated during the upload request of the file.
    // Read Only: true
    Size float64 `json:"size,omitempty"`

    // The url to download or view the file.
    //
    // This URL is generated on the server, based on where it was able to store the file when it was uploaded.
    //
    // Read Only: true
    // Format: uri
    URL strfmt.URI `json:"url,omitempty"`
}

TaskAttachmentsAnon task attachments anon swagger:model TaskAttachmentsAnon

func (*TaskAttachmentsAnon) MarshalBinary Uses

func (m *TaskAttachmentsAnon) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TaskAttachmentsAnon) UnmarshalBinary Uses

func (m *TaskAttachmentsAnon) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TaskAttachmentsAnon) Validate Uses

func (m *TaskAttachmentsAnon) Validate(formats strfmt.Registry) error

Validate validates this task attachments anon

type TaskCard Uses

type TaskCard struct {

    // assigned to
    AssignedTo *UserCard `json:"assignedTo,omitempty"`

    // The description of the task.
    //
    // The task description is a longer, more detailed description of the issue.
    // Perhaps it even mentions steps to reproduce.
    //
    Description string `json:"description,omitempty"`

    // the level of effort required to get this task completed
    // Maximum: 27
    // Multiple Of: 3
    Effort int32 `json:"effort,omitempty"`

    // The id of the task.
    //
    // A unique identifier for the task. These are created in ascending order.
    // Read Only: true
    ID  int64 `json:"id,omitempty"`

    // the karma donated to this item.
    //
    // Karma is a lot like voting.  Users can donate a certain amount or karma to an issue.
    // This is used to determine the weight users place on an issue. Not that +1 comments aren't great.
    //
    // Minimum: > 0
    // Multiple Of: 0.5
    Karma float64 `json:"karma,omitempty"`

    // milestone
    Milestone *Milestone `json:"milestone,omitempty"`

    // The time at which this issue was reported.
    //
    // This field is read-only, so it's only sent as part of the response.
    //
    // Read Only: true
    // Format: date-time
    ReportedAt strfmt.DateTime `json:"reportedAt,omitempty"`

    // severity
    // Maximum: 5
    // Minimum: 1
    Severity int32 `json:"severity,omitempty"`

    // the status of the issue
    //
    // There are 4 possible values for a status.
    // Ignored means as much as accepted but not now, perhaps later.
    //
    // Required: true
    // Enum: [open closed ignored rejected]
    Status *string `json:"status"`

    // task tags.
    //
    // a task can be tagged with text blurbs.
    // Max Items: 5
    // Unique: true
    Tags []string `json:"tags"`

    // The title of the task.
    //
    // The title for a task, this needs to be at least 5 chars long.
    // Titles don't allow any formatting, besides emoji.
    //
    // Required: true
    // Max Length: 150
    // Min Length: 5
    Title *string `json:"title"`
}

TaskCard a card for a task

A task card is a minimalistic representation of a task. Useful for display in list views, like a card list.

swagger:model TaskCard

func (*TaskCard) MarshalBinary Uses

func (m *TaskCard) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*TaskCard) UnmarshalBinary Uses

func (m *TaskCard) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*TaskCard) Validate Uses

func (m *TaskCard) Validate(formats strfmt.Registry) error

Validate validates this task card

type UserCard Uses

type UserCard struct {

    // When true this user is an admin.
    //
    // Only employees of the owning company can be admins.
    // Admins are like project owners but have access to all the projects in the application.
    // There aren't many admins, and it's only used for extremly critical issues with the application.
    //
    // Read Only: true
    Admin *bool `json:"admin,omitempty"`

    // The amount of karma this user has available.
    //
    // In this application users get a cerain amount of karma alotted.
    // This karma can be donated to other users to show appreciation, or it can be used
    // by a user to vote on issues.
    // Once an issue is closed or rejected, the user gets his karma back.
    //
    // Read Only: true
    // Maximum: < 1000
    AvailableKarma float64 `json:"availableKarma,omitempty"`

    // A unique identifier for a user.
    //
    // This id is automatically generated on the server when a user is created.
    //
    // Required: true
    // Read Only: true
    ID  int64 `json:"id"`

    // The screen name for the user.
    //
    // This is used for vanity type urls as well as login credentials.
    //
    // Required: true
    // Max Length: 255
    // Min Length: 3
    // Pattern: \w[\w_-]+
    ScreenName *string `json:"screenName"`
}

UserCard A minimal representation of a user.

This representation of a user is mainly meant for inclusion in other models, or for list views.

swagger:model UserCard

func (*UserCard) MarshalBinary Uses

func (m *UserCard) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (*UserCard) UnmarshalBinary Uses

func (m *UserCard) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*UserCard) Validate Uses

func (m *UserCard) Validate(formats strfmt.Registry) error

Validate validates this user card

type ValidationError Uses

type ValidationError struct {
    Error

    // an optional field name to which this validation error applies
    Field string `json:"field,omitempty"`
}

ValidationError validation error swagger:model ValidationError

func (*ValidationError) MarshalBinary Uses

func (m *ValidationError) MarshalBinary() ([]byte, error)

MarshalBinary interface implementation

func (ValidationError) MarshalJSON Uses

func (m ValidationError) MarshalJSON() ([]byte, error)

MarshalJSON marshals this object to a JSON structure

func (*ValidationError) UnmarshalBinary Uses

func (m *ValidationError) UnmarshalBinary(b []byte) error

UnmarshalBinary interface implementation

func (*ValidationError) UnmarshalJSON Uses

func (m *ValidationError) UnmarshalJSON(raw []byte) error

UnmarshalJSON unmarshals this object from a JSON structure

func (*ValidationError) Validate Uses

func (m *ValidationError) Validate(formats strfmt.Registry) error

Validate validates this validation error

Package models imports 6 packages (graph) and is imported by 24 packages. Updated 2018-12-26. Refresh now. Tools for package owners.