role

package
v0.0.0-...-20ecdb9 Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Admin

type Admin struct {
	ID     string   `json:"id"`
	Level  int      `json:"level"`
	Type   int      `json:"type,omitempty"`
	Groups []string `json:"groups,omitempty"`
}

Admin defines the struct of admin.

type Bot

type Bot struct {
	AccessToken string `json:"access_token"`
	Owner       string `json:"owner"`
	URL         string `json:"url"`
	Timeout     int    `json:"timeout"`
	SelfID      string `json:"-"`
	NickName    string `json:"-"`
}

Bot defines a onebot client.

type User

type User struct {
	IsDelete        bool           `json:"is_delete,omitempty"`
	ID              string         `json:"id"`
	RegisteredGroup []string       `json:"registered_group"`
	NickName        string         `json:"nickname"`
	WakaAPIs        *wakatime.APIs `json:"wakaapi"`
	// contains filtered or unexported fields
}

User defines the struct of user.

func (*User) Delete

func (u *User) Delete()

Delete marks this user as deleted.

func (*User) RegistertoGroup

func (u *User) RegistertoGroup(groupID string) error

RegistertoGroup registers user to given group, which means this user can use function in the given group.

Jump to

Keyboard shortcuts

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