Help us shape the future of Go! Take the 2026 Go Developer Survey

channels

package
v0.135.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package channels manages authoring homes and their public identity. Channels are not metadata: their AuthKit groups govern their original content items.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Card

type Card struct {
	ID           string                 `json:"id"`
	Slug         string                 `json:"slug"`
	Name         string                 `json:"name"`
	NameLanguage string                 `json:"name_language,omitempty"`
	Code         string                 `json:"code,omitempty"`
	Path         string                 `json:"path,omitempty"`
	Cover        *entities.Cover        `json:"cover,omitempty"`
	Avatar       *entities.Avatar       `json:"avatar,omitempty"`
	Count        int                    `json:"count"`
	Access       *entities.EntityAccess `json:"access,omitempty"`
	CreatedAt    time.Time              `json:"created_at"`
}

Card is a channel's public identity and optional paid membership standing.

type Channel

type Channel struct {
	Card
	State       entities.State        `json:"state"`
	OwnerUserID string                `json:"owner_user_id,omitempty"`
	AuthScope   string                `json:"auth_scope,omitempty"`
	Revision    int64                 `json:"revision"`
	UpdatedAt   time.Time             `json:"updated_at"`
	Names       []entities.Name       `json:"names"`
	Text        []entities.Text       `json:"text"`
	Counts      []entities.Count      `json:"counts"`
	Entities    []entities.EntityCard `json:"entities"`
}

Channel includes editable identity and metadata. Metadata grants no authority.

type Import

type Import struct {
	ID          string
	Slug        string
	State       entities.State
	Cover       *entities.Cover
	Avatar      *entities.Avatar
	OwnerUserID string
	AuthScope   string
	Names       []entities.Name
	Text        []entities.Text
	Code        string
	CreatedAt   *time.Time
	UpdatedAt   *time.Time
}

Import is a channel's explicit imported identity. Source media, public codes and authorization group IDs remain stable. Omitted names/text preserve them.

type Input

type Input struct {
	Slug   string           `json:"slug"`
	Names  []entities.Name  `json:"names,omitempty"`
	Text   []entities.Text  `json:"text,omitempty"`
	Cover  *entities.Cover  `json:"cover,omitempty"`
	Avatar *entities.Avatar `json:"avatar,omitempty"`
}

type Mine

type Mine struct {
	Card
	Owner      bool `json:"owner"`
	Editor     bool `json:"editor"`
	CanPost    bool `json:"can_post"`
	CanEditOwn bool `json:"can_edit_own"`
	Writer     bool `json:"writer"`
	Moderator  bool `json:"moderator"`
	Member     bool `json:"member"`
}

Mine includes current authoring permissions, not the creator's past authority.

type MyPage

type MyPage struct {
	Channels   []Mine `json:"channels"`
	NextCursor string `json:"next_cursor,omitempty"`
}

type Page

type Page struct {
	Channels   []Card `json:"channels"`
	NextCursor string `json:"next_cursor,omitempty"`
	Total      *int   `json:"total,omitempty"`
}

type Repost

type Repost struct {
	ChannelID string    `json:"channel_id"`
	ActorID   string    `json:"actor_id,omitempty"`
	CreatedAt time.Time `json:"created_at"`
	CanRemove bool      `json:"can_remove"`
}

Repost identifies the destination reference without copying original content.

type Update

type Update struct {
	ID          string           `json:"-"`
	OwnerUserID *string          `json:"owner_user_id,omitempty"`
	Slug        *string          `json:"slug,omitempty"`
	Names       []entities.Name  `json:"names,omitempty"`
	Text        []entities.Text  `json:"text,omitempty"`
	Cover       *entities.Cover  `json:"cover,omitempty"`
	Avatar      *entities.Avatar `json:"avatar,omitempty"`
	State       *entities.State  `json:"state,omitempty"`
}

Jump to

Keyboard shortcuts

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