vk

package
v0.0.0-...-34f79f7 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2022 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Overview

This file is part of manifold. Manifold is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. Manifold is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with manifold. If not, see <https://www.gnu.org/licenses/>.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ComparisonOutg

type ComparisonOutg struct {
	Local  id.Id
	Puppet int
}

type IdComparisonInc

type IdComparisonInc struct {
	Vk    int
	Local id.Id
}

type Puppet

type Puppet struct {
	Vk     api.VK
	PeerId int
}

type PuppetConfig

type PuppetConfig struct {
	Token  string
	PeerId int
}

type VkUnit

type VkUnit struct {
	// contains filtered or unexported fields
}

func NewVkUnit

func NewVkUnit(config VkUnitConfig) VkUnit

func (*VkUnit) GetApi

func (v *VkUnit) GetApi(local id.Id) *api.VK

func (*VkUnit) GetHeader

func (v *VkUnit) GetHeader(msg events.MsgEvent) string

func (*VkUnit) GetIncId

func (v *VkUnit) GetIncId(vkid int) (id.Id, error)

func (*VkUnit) GetPeerId

func (v *VkUnit) GetPeerId(local id.Id) int

func (*VkUnit) Init

func (v *VkUnit) Init(ucontxt *units.UnitContext) error

func (*VkUnit) Run

func (v *VkUnit) Run(group *errgroup.Group, ctx context.Context) error

func (*VkUnit) Stop

func (v *VkUnit) Stop() error

type VkUnitConfig

type VkUnitConfig struct {
	Token     string
	PeerId    int
	UsersInc  []IdComparisonInc
	UsersOutg []ComparisonOutg
	Puppet    []PuppetConfig
}

Jump to

Keyboard shortcuts

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