Documentation ¶
Index ¶
- type Client
- func (c *Client) Alive() (*Token, error)
- func (c *Client) Info() (*ServerInfo, error)
- func (c *Client) Login(user *User) (*Token, error)
- func (c *Client) MachineSignup() (*Token, error)
- func (c *Client) PinlClear() error
- func (c *Client) PinlCreate(in *Pinl) (*Pinl, error)
- func (c *Client) PinlDelete(pinlID string) error
- func (c *Client) PinlList(opts *PinlListOpts) ([]*Pinl, error)
- func (c *Client) PkgList(opts *PkgListOpts) (*MonpkgListResponse, error)
- func (c *Client) SetClient(client *http.Client)
- func (c *Client) ShareDelete(slug string) error
- func (c *Client) SharePrepare(slug string, in *Share) (*Share, error)
- func (c *Client) SharePublish(slug string) (*Share, error)
- func (c *Client) SharepinCreate(slug string, in *Sharepin) (*Sharepin, error)
- func (c *Client) SharetagCreate(slug string, in *Sharetag) (*Sharetag, error)
- func (c *Client) Sharing(user, slug string) (*Share, error)
- func (c *Client) SharingPinlList(user, slug string, opts *PinlListOpts) ([]*Pinl, error)
- func (c *Client) SharingTagList(user, slug string, opts *TagListOpts) ([]*Tag, error)
- func (c *Client) Signup(user *User) (*Token, error)
- func (c *Client) StatList(opts *StatListOpts) (*StatListResponse, error)
- type ListOpts
- type Monpkg
- type MonpkgKind
- type MonpkgListResponse
- type Pinl
- type PinlListOpts
- type Pkg
- type PkgListOpts
- type ServerInfo
- type Share
- type Sharepin
- type Sharetag
- type SharetagKind
- type Stat
- type StatKind
- type StatListOpts
- type StatListResponse
- type StatValueType
- type Status
- type Tag
- type TagListOpts
- type Token
- type User
- type UserRole
- type UserStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) Info ¶
func (c *Client) Info() (*ServerInfo, error)
func (*Client) MachineSignup ¶
func (*Client) PinlDelete ¶
func (*Client) PkgList ¶
func (c *Client) PkgList(opts *PkgListOpts) (*MonpkgListResponse, error)
func (*Client) ShareDelete ¶
func (*Client) SharepinCreate ¶
func (*Client) SharetagCreate ¶
func (*Client) SharingPinlList ¶
func (c *Client) SharingPinlList(user, slug string, opts *PinlListOpts) ([]*Pinl, error)
func (*Client) SharingTagList ¶
func (c *Client) SharingTagList(user, slug string, opts *TagListOpts) ([]*Tag, error)
func (*Client) StatList ¶
func (c *Client) StatList(opts *StatListOpts) (*StatListResponse, error)
type Monpkg ¶
type Monpkg struct { ID string `json:"id"` MonlID string `json:"monlId"` PkgID string `json:"pkgId"` Kind MonpkgKind `json:"kind"` Pkg *Pkg `json:"pkg"` }
type MonpkgKind ¶
type MonpkgKind int
type MonpkgListResponse ¶
type Pinl ¶
type Pinl struct { ID string `json:"id"` UserID string `json:"userId"` MonlID string `json:"monlId"` URL string `json:"url"` Title string `json:"title"` Description string `json:"description"` ImageID string `json:"imageId"` Status Status `json:"status"` CreatedAt field.Time `json:"createdAt"` UpdatedAt field.Time `json:"updatedAt"` TagNames *[]string `json:"tagNames,omitempty"` }
type PinlListOpts ¶
func (PinlListOpts) Encode ¶
func (p PinlListOpts) Encode() string
type Pkg ¶
type Pkg struct { ID string `json:"id"` URL string `json:"url"` Provider string `json:"provider"` ProviderHost string `json:"providerHost"` ProviderURI string `json:"providerUri"` ProviderProto string `json:"providerProto"` Title string `json:"title"` Description string `json:"description"` ImageID string `json:"imageId"` CustomUri string `json:"customUri"` CreatedAt field.Time `json:"createdAt"` UpdatedAt field.Time `json:"updatedAt"` }
type PkgListOpts ¶
func (PkgListOpts) Encode ¶
func (p PkgListOpts) Encode() string
type ServerInfo ¶
type ServerInfo struct {
Version string `json:"version"`
}
type SharetagKind ¶
type SharetagKind int
type Stat ¶
type Stat struct { ID string `json:"id"` PkgID string `json:"pkgId"` ParentID string `json:"parentId"` RecordedAt field.Time `json:"recordedAt"` Kind StatKind `json:"kind"` Name string `json:"name"` Value string `json:"value"` ValueType StatValueType `json:"valueType"` Checksum string `json:"checksum"` Weight int `json:"weight"` IsLatest bool `json:"isLatest"` HasChildren bool `json:"hasChildren"` Substats *[]*Stat `json:"substats,omitempty"` }
type StatListOpts ¶
type StatListOpts struct { ListOpts Kinds []string Latest field.NullBool Parents []string Pkgs []string }
func (StatListOpts) Encode ¶
func (s StatListOpts) Encode() string
type StatListResponse ¶
type StatValueType ¶
type StatValueType int
type Tag ¶
type Tag struct { ID string `json:"id"` Name string `json:"name"` UserID string `json:"userId"` ParentID string `json:"parentId"` Level int `json:"level"` Color string `json:"color"` BgColor string `json:"bgColor"` HasChildren bool `json:"hasChildren"` CreatedAt field.Time `json:"createdAt"` UpdatedAt field.Time `json:"updatedAt"` }
type TagListOpts ¶
func (TagListOpts) Encode ¶
func (t TagListOpts) Encode() string
type User ¶
type User struct { ID string `json:"id"` Login string `json:"login"` Password string `json:"password"` Name string `json:"name"` ImageID string `json:"imageId"` Hash string `json:"-"` Role UserRole `json:"role"` Status UserStatus `json:"status"` LastSeen field.Time `json:"lastSeen"` CreatedAt field.Time `json:"createdAt"` UpdatedAt field.Time `json:"updatedAt"` }
type UserStatus ¶
type UserStatus int
Click to show internal directories.
Click to hide internal directories.