januscluster

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 16, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ApiKey    = "api-key"
	ApiSecret = "api-secret"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Endpoint string

	ApiKey    string
	ApiSecret string
}

func NewClient

func NewClient(endpoint, apiKey, apiSecret string) *Client

func (*Client) Create

func (a *Client) Create(ctx context.Context, input *CreateRoomRequest) error

func (*Client) Destroy

func (a *Client) Destroy(ctx context.Context, input *DestroyRoomRequest) error

func (*Client) Ticket

func (a *Client) Ticket(ctx context.Context, input *CreateTicketRequest) (*TicketKey, error)

type CreateRoomRequest

type CreateRoomRequest = Room

type CreateTicketRequest

type CreateTicketRequest = Ticket

type DestroyRoomRequest

type DestroyRoomRequest struct {
	ID string `json:"room_id"`
}

type Room

type Room struct {
	ID        string    `json:"id"`
	AuthorID  string    `json:"author_id"`
	Capacity  int       `json:"capacity"`
	StartedAt time.Time `json:"started_at"`
	EndedAt   time.Time `json:"ended_at"`
}

type Ticket

type Ticket struct {
	RoomID       string `json:"room_id"`
	AuthorID     string `json:"author_id"`
	IssuerUserID string `json:"issuer_user_id"`
	IsListener   bool   `json:"is_listener"`
}

func (*Ticket) IsAuthor

func (a *Ticket) IsAuthor() bool

type TicketKey

type TicketKey struct {
	Value string `json:"value"`
}

Jump to

Keyboard shortcuts

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