model

package
v0.0.0-...-efb46b8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 17, 2022 License: GPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AnkiAddDeckRequest

type AnkiAddDeckRequest struct {
	Action  string `json:"action"`
	Version int    `json:"version"`
	Params  struct {
		Deck string `json:"deck"`
	} `json:"params"`
}

type AnkiAddNoteRequest

type AnkiAddNoteRequest struct {
	Action  string `json:"action"`
	Version int    `json:"version"`
	Params  struct {
		Note struct {
			DeckName  string `json:"deckName"`
			ModelName string `json:"modelName"`
			Fields    struct {
				Front string `json:"Front"`
				Back  string `json:"Back"`
			} `json:"fields"`
			Options struct {
				AllowDuplicate bool `json:"allowDuplicate"`
			} `json:"options"`
			Tags []string `json:"tags"`
		} `json:"note"`
	} `json:"params"`
}

func (AnkiAddNoteRequest) GetAnkiAddNote

func (AnkiAddNoteRequest) GetAnkiAddNote(card *trello.Card) (addNoteAnkiRequest *AnkiAddNoteRequest)

type AnkiResponse

type AnkiResponse struct {
	Result int64  `json:"result"`
	Error  string `json:"error"`
}

type AnkiUpdateNoteFieldsRequest

type AnkiUpdateNoteFieldsRequest struct {
	Action  string `json:"action"`
	Version int    `json:"version"`
	Params  struct {
		Note struct {
			ID     int64 `json:"id"`
			Fields struct {
				Front string `json:"Front"`
				Back  string `json:"Back"`
			} `json:"fields"`
		} `json:"note"`
	} `json:"params"`
}

type TrelloWebhookResponse

type TrelloWebhookResponse struct {
	Action struct {
		ID              string `json:"id"`
		IDMemberCreator string `json:"idMemberCreator"`
		Data            struct {
			Board struct {
				Name string `json:"name"`
				ID   string `json:"id"`
			} `json:"board"`
			Card struct {
				IDShort int    `json:"idShort"`
				Name    string `json:"name"`
				ID      string `json:"id"`
			} `json:"card"`
			Voted bool `json:"voted"`
		} `json:"data"`
		Type          string    `json:"type"`
		Date          time.Time `json:"date"`
		MemberCreator struct {
			ID         string `json:"id"`
			AvatarHash string `json:"avatarHash"`
			FullName   string `json:"fullName"`
			Initials   string `json:"initials"`
			Username   string `json:"username"`
		} `json:"memberCreator"`
	} `json:"action"`
	Model struct {
		ID             string `json:"id"`
		Name           string `json:"name"`
		Desc           string `json:"desc"`
		Closed         bool   `json:"closed"`
		IDOrganization string `json:"idOrganization"`
		Pinned         bool   `json:"pinned"`
		URL            string `json:"url"`
		Prefs          struct {
			PermissionLevel string `json:"permissionLevel"`
			Voting          string `json:"voting"`
			Comments        string `json:"comments"`
			Invitations     string `json:"invitations"`
			SelfJoin        bool   `json:"selfJoin"`
			CardCovers      bool   `json:"cardCovers"`
			CanBePublic     bool   `json:"canBePublic"`
			CanBeOrg        bool   `json:"canBeOrg"`
			CanBePrivate    bool   `json:"canBePrivate"`
			CanInvite       bool   `json:"canInvite"`
		} `json:"prefs"`
		LabelNames struct {
			Yellow string `json:"yellow"`
			Red    string `json:"red"`
			Purple string `json:"purple"`
			Orange string `json:"orange"`
			Green  string `json:"green"`
			Blue   string `json:"blue"`
		} `json:"labelNames"`
	} `json:"model"`
}

webhook 的请求值

func (*TrelloWebhookResponse) Scan

func (a *TrelloWebhookResponse) Scan(value interface{}) error

Make the Attrs struct implement the sql.Scanner interface. This method simply decodes a JSON-encoded value into the struct fields.

func (TrelloWebhookResponse) Value

func (a TrelloWebhookResponse) Value() (driver.Value, error)

Make the Attrs struct implement the driver.Valuer interface. This method simply returns the JSON-encoded representation of the struct.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL