Documentation
¶
Overview ¶
Package auth implements authentication checks and storage.
Index ¶
- Constants
- Variables
- func BuildDevice(idg *uid.UidGenerator, did *string, isHuman, genNewDevice bool) (string, string, error)
- func BuildEvent(builder *gomatrixserverlib.EventBuilder, domain string, cfg config.Dendrite, ...) (*gomatrixserverlib.Event, error)
- func BuildPreBatch(streamPos, timestamp int64) string
- func BuildRandomURLEncString() (string, error)
- func BuildStaticURLEncString() (string, error)
- func BuildSuperAdminToken(key, id, loc, userId, deviceIdentifier string, guest bool, ...) (string, error)
- func BuildToken(key, id, loc, userId, deviceIdentifier string, guest bool, ...) (string, error)
- func BytesToUint32(i []byte) uint32
- func CalcStringHashCode(str string) uint32
- func CalcStringHashCode64(str string) uint64
- func CheckValidDomain(id string, domains []string) bool
- func ContextWithSpan(ctx context.Context, span opentracing.Span) context.Context
- func CreateDatabase(driver, addr, name string) error
- func EndTransaction(txn Transaction, succeeded *bool)
- func ExportMetricsBeforeSending(span opentracing.Span, metricName string, protocol string)
- func ExtractAccessToken(req *http.Request) (string, error)
- func ExtractToken(key, id, loc, token string) (*authtypes.Device, bool, error)
- func FilterEventTypes(events *[]gomatrixserverlib.ClientEvent, types *[]string, notTypes *[]string) *[]gomatrixserverlib.ClientEvent
- func FromBase64(in string) []byte
- func GetDBInstance(name string, cfg core.IConfig) (interface{}, error)
- func GetDeviceMac(deviceID string) string
- func GetDomainByUserID(userID string) string
- func GetGaugeInstance() mon.LabeledGauge
- func GetJsonResponse(data []byte) util.JSONResponse
- func GetMsgType(content map[string]interface{}) (string, bool)
- func GetProcessorMultiplexer() core.IMultiplexer
- func GetRemoteIP(r *http.Request) string
- func GetSyncInstance(key string, total uint32) uint32
- func GetTransportMultiplexer() core.IMultiplexer
- func InjectSpanToHeader(span opentracing.Span) map[string]string
- func InjectSpanToHeaderForSending(span opentracing.Span) map[string]string
- func IsActualDevice(deviceType string) bool
- func IsCreatingDirectRoomEv(ev *gomatrixserverlib.Event) (bool, error)
- func IsExtEvent(ev *gomatrixserverlib.ClientEvent) bool
- func IsMediaEv(content map[string]interface{}) bool
- func IsRelatedRequest(key string, instance, total uint32, multiWrite bool) bool
- func IsRelatedSyncRequest(reqInstance, curInstance, total uint32, multiWrite bool) bool
- func IsStateClientEv(ev *gomatrixserverlib.ClientEvent) bool
- func IsStateEv(ev *gomatrixserverlib.Event) bool
- func IsUniqueConstraintViolationErr(err error) bool
- func LogStack()
- func MakeAuthAPI(metricsName string, cache service.Cache, cfg config.Dendrite, ...) http.Handler
- func MakeExternalAPI(metricsName string, f func(*http.Request) util.JSONResponse) http.Handler
- func MakeFedAPI(metricsName string, serverName gomatrixserverlib.ServerName, ...) http.Handler
- func MakeInternalAPI(metricsName string, f func(*http.Request) util.JSONResponse) http.Handler
- func MakeInternalAuthAPI(metricsName string, cache service.Cache, ...) http.Handler
- func NatsWrapHandler(handler nats.MsgHandler) nats.MsgHandler
- func NatsWrapHandlerWithContext(metricName string, handler MsgHandlerWithContext) nats.MsgHandler
- func PanicTrace(kb int) []byte
- func ParseNatsData(data []byte) ([]byte, opentracing.HTTPHeadersCarrier)
- func Register(name string, ...)
- func SetProcessorMultiplexer(multp core.IMultiplexer)
- func SetTransportMultiplexer(multp core.IMultiplexer)
- func SetupHTTPAPI(servMux *http.ServeMux, apiMux http.Handler)
- func SpanFromContext(ctx context.Context) opentracing.Span
- func SplitMxc(s string) (domain, netdiskID string)
- func StartSobSomSpan(ctx context.Context, operationName string) (opentracing.Span, context.Context)
- func StartSomSpan(ctx context.Context, operationName string) (opentracing.Span, context.Context)
- func StartSpanFromContext(ctx context.Context, operationName string, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context)
- func StartSpanFromMsgAfterReceived(metricName string, msg interface{}) opentracing.Span
- func StripPrefix(prefix string, h http.Handler) http.HandlerFunc
- func ToBase64(b []byte) string
- func TxStmt(transaction *sql.Tx, statement *sql.Stmt) *sql.Stmt
- func Uint32ToBytes(i uint32) []byte
- func UnmarshalJSON(req *http.Request, iface interface{}) error
- func VerifyToken(token string, requestURI string, cache service.Cache, cfg config.Dendrite, ...) (*authtypes.Device, *util.JSONResponse)
- func WithTransaction(db *sql.DB, fn func(txn *sql.Tx) error) (err error)
- func WrapHandlerInCORS(h http.Handler) http.HandlerFunc
- type AliasesContent
- type AvatarContent
- type CanonicalAliasContent
- type ComplexCache
- func (c *ComplexCache) GetAvatarURL(ctx context.Context, userID string) (string, error)
- func (c *ComplexCache) GetDisplayName(ctx context.Context, userID string) (string, error)
- func (c *ComplexCache) GetProfileByUserID(ctx context.Context, userID string) (string, string, error)
- func (c *ComplexCache) SetAvatarURL(ctx context.Context, userID string, avatarURL string) error
- func (c *ComplexCache) SetDefaultAvatarURL(avatarURL string)
- func (c *ComplexCache) SetDisplayName(ctx context.Context, userID string, displayName string) error
- func (c *ComplexCache) SetProfile(ctx context.Context, userID string, displayName string, avatarURL string) error
- type ContextMsg
- type CreateContent
- type DescContent
- type FedDomainInfo
- type FedDomains
- func (f *FedDomains) GetAllDomainInfos() []FedDomainInfo
- func (f *FedDomains) GetAllFedDomains() []string
- func (f *FedDomains) GetDomainHost(domain string) (string, bool)
- func (f *FedDomains) GetDomainInfo(domain string) (FedDomainInfo, bool)
- func (f *FedDomains) LoadCache()
- func (f *FedDomains) OnFedDomainsUpdate(domains []FedDomainInfo)
- type GuestAccessContent
- type HistoryVisibilityContent
- type Hooks
- type ImageInfo
- type JoinRulesContent
- type MsgHandlerWithContext
- type MultiplexerMng
- type NameContent
- type PowerLevelContent
- type PublicKey
- type RawCache
- type Result
- type RpcCB
- type RpcClient
- func (nc *RpcClient) Pub(topic string, bytes []byte)
- func (nc *RpcClient) PubObj(topic string, obj interface{})
- func (nc *RpcClient) Reply(topic string, handler nats.MsgHandler)
- func (nc *RpcClient) ReplyGrp(topic, grp string, handler nats.MsgHandler)
- func (nc *RpcClient) ReplyGrpWithContext(topic, grp string, handler MsgHandlerWithContext)
- func (nc *RpcClient) ReplyWithContext(topic string, handler MsgHandlerWithContext)
- func (nc *RpcClient) Request(topic string, bytes []byte, timeout int) ([]byte, error)
- func (nc *RpcClient) RequestWithContext(ctx context.Context, topic string, bytes []byte, timeout int) ([]byte, error)
- func (nc *RpcClient) Start(clean bool)
- func (nc *RpcClient) SubRaw(cb RpcCB)
- func (nc *RpcClient) Unsubscribe(cb RpcCB)
- type SettingCache
- type Settings
- type SettingsConsumer
- type ThirdPartyInviteContent
- type TopicContent
- type Transaction
- type VisibilityContent
Constants ¶
const DeleteMark = "__D__"
const HeaderLengthBytes = 4 // size of uint32
const MagicNum = 0xF0F0F0F0
const MagicNumBytes = 4 // size of uint32
const MaxSpanBytesLength = 1024
MaxSpanBytesLength is at least 136 for jaeger, if a span carrier length exceed this value, it will be discarded
const SpanKey = "span"
Variables ¶
var DefaultKeyCount = func() map[string]int { m := make(map[string]int) m["curve25519"] = 50 m["signed_curve25519"] = 50 return m }
var DoCompress = utils.DoCompress
var DoUnCompress = utils.DoUnCompress
var DomainFromID = utils.DomainFromID
var ErrRoomNoExists = errors.New("Room does not exist")
ErrRoomNoExists is returned when trying to lookup the state of a room that doesn't exist
var GetStringHash = utils.GetStringHash
var InitKeyCount = func() map[string]int { m := make(map[string]int) m["curve25519"] = 0 m["signed_curve25519"] = 0 return m }
var LoadDomainFromDB = false
var PathExists = utils.PathExists
Functions ¶
func BuildDevice ¶
func BuildEvent ¶
func BuildEvent( builder *gomatrixserverlib.EventBuilder, domain string, cfg config.Dendrite, idg *uid.UidGenerator, ) (*gomatrixserverlib.Event, error)
BuildEvent builds a Matrix event using the event builder and roomserver query API client provided. If also fills roomserver query API response (if provided) in case the function calling FillBuilder needs to use it. Returns ErrRoomNoExists if the state of the room could not be retrieved because the room doesn't exist Returns an error if something else went wrong
func BuildPreBatch ¶
func BuildRandomURLEncString ¶
func BuildStaticURLEncString ¶
func BuildSuperAdminToken ¶
func BuildToken ¶
func BytesToUint32 ¶
func CalcStringHashCode ¶
func CalcStringHashCode64 ¶
func CheckValidDomain ¶
func ContextWithSpan ¶
store a span into context.Context, so it can be passed to other place
func CreateDatabase ¶
func EndTransaction ¶
func EndTransaction(txn Transaction, succeeded *bool)
EndTransaction ends a transaction. If the transaction succeeded then it is committed, otherwise it is rolledback.
func ExportMetricsBeforeSending ¶
export metric sob, som before sending, argument protocal can choose from: kafka|nats|http
func FilterEventTypes ¶
func FilterEventTypes(events *[]gomatrixserverlib.ClientEvent, types *[]string, notTypes *[]string) *[]gomatrixserverlib.ClientEvent
func FromBase64 ¶
func GetDeviceMac ¶
func GetDomainByUserID ¶
func GetGaugeInstance ¶
func GetGaugeInstance() mon.LabeledGauge
func GetJsonResponse ¶
func GetJsonResponse(data []byte) util.JSONResponse
func GetMsgType ¶
func GetProcessorMultiplexer ¶
func GetProcessorMultiplexer() core.IMultiplexer
func GetRemoteIP ¶
func GetSyncInstance ¶
func GetTransportMultiplexer ¶
func GetTransportMultiplexer() core.IMultiplexer
func InjectSpanToHeader ¶
func IsActualDevice ¶
func IsCreatingDirectRoomEv ¶
func IsCreatingDirectRoomEv(ev *gomatrixserverlib.Event) (bool, error)
func IsExtEvent ¶
func IsExtEvent(ev *gomatrixserverlib.ClientEvent) bool
func IsRelatedRequest ¶
func IsRelatedSyncRequest ¶
func IsStateClientEv ¶
func IsStateClientEv(ev *gomatrixserverlib.ClientEvent) bool
func IsStateEv ¶
func IsStateEv(ev *gomatrixserverlib.Event) bool
func IsUniqueConstraintViolationErr ¶
IsUniqueConstraintViolationErr returns true if the error is a postgresql unique_violation error
func MakeAuthAPI ¶
func MakeAuthAPI( metricsName string, cache service.Cache, cfg config.Dendrite, devFilter *filter.SimpleFilter, histogram mon.LabeledHistogram, f func(*http.Request, *authtypes.Device) util.JSONResponse, ) http.Handler
MakeAuthAPI turns a util.JSONRequestHandler function into an http.Handler which checks the access token in the request.
func MakeExternalAPI ¶
MakeExternalAPI turns a util.JSONRequestHandler function into an http.Handler. This is used for APIs that are called from the internet.
func MakeFedAPI ¶
func MakeFedAPI( metricsName string, serverName gomatrixserverlib.ServerName, keyRing gomatrixserverlib.KeyRing, histogram mon.LabeledHistogram, f func(*http.Request, *gomatrixserverlib.FederationRequest) util.JSONResponse, ) http.Handler
MakeFedAPI makes an http.Handler that checks matrix federation authentication.
func MakeInternalAPI ¶
MakeInternalAPI turns a util.JSONRequestHandler function into an http.Handler. This is used for APIs that are internal to dendrite. If we are passed a tracing context in the request headers then we use that as the parent of any tracing spans we create.
func MakeInternalAuthAPI ¶
func NatsWrapHandler ¶
func NatsWrapHandler(handler nats.MsgHandler) nats.MsgHandler
func NatsWrapHandlerWithContext ¶
func NatsWrapHandlerWithContext(metricName string, handler MsgHandlerWithContext) nats.MsgHandler
func PanicTrace ¶
func ParseNatsData ¶
func Register ¶
func Register(name string, f func(string, string, string, string, string, bool) (interface{}, error))
can't use skunkworks log
func SetProcessorMultiplexer ¶
func SetProcessorMultiplexer(multp core.IMultiplexer)
func SetTransportMultiplexer ¶
func SetTransportMultiplexer(multp core.IMultiplexer)
func SetupHTTPAPI ¶
SetupHTTPAPI registers an HTTP API mux under /api and sets up a metrics listener.
func SpanFromContext ¶
restore a span from context.Context, so it can be the parent of another child or follow span
func StartSobSomSpan ¶
create a follow span from the span stored in context.Context
func StartSomSpan ¶
create a follow span from the span stored in context.Context
func StartSpanFromContext ¶
func StartSpanFromContext(ctx context.Context, operationName string, opts ...opentracing.StartSpanOption) (opentracing.Span, context.Context)
create a follow span from the span stored in context.Context
func StartSpanFromMsgAfterReceived ¶
func StartSpanFromMsgAfterReceived(metricName string, msg interface{}) opentracing.Span
func StripPrefix ¶
func StripPrefix(prefix string, h http.Handler) http.HandlerFunc
func TxStmt ¶
TxStmt wraps an SQL stmt inside an optional transaction. If the transaction is nil then it returns the original statement that will run outside of a transaction. Otherwise returns a copy of the statement that will run inside the transaction.
func Uint32ToBytes ¶
func UnmarshalJSON ¶
func VerifyToken ¶
func WithTransaction ¶
WithTransaction runs a block of code passing in an SQL transaction If the code returns an error or panics then the transactions is rolledback Otherwise the transaction is committed.
func WrapHandlerInCORS ¶
func WrapHandlerInCORS(h http.Handler) http.HandlerFunc
WrapHandlerInCORS adds CORS headers to all responses, including all error responses. Handles OPTIONS requests directly.
Types ¶
type AliasesContent ¶
type AliasesContent struct {
Aliases []string `json:"aliases"`
}
AliasesContent is the event content for http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-aliases
type AvatarContent ¶
type AvatarContent struct { Info ImageInfo `json:"info,omitempty"` URL string `json:"url"` ThumbnailURL string `json:"thumbnail_url,omitempty"` ThumbnailInfo ImageInfo `json:"thumbnail_info,omitempty"` }
AvatarContent is the event content for http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-avatar
type CanonicalAliasContent ¶
type CanonicalAliasContent struct {
Alias string `json:"alias"`
}
CanonicalAliasContent is the event content for http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-canonical-alias
type ComplexCache ¶
type ComplexCache struct {
// contains filtered or unexported fields
}
func NewComplexCache ¶
func NewComplexCache(db model.AccountsDatabase, cache RawCache) *ComplexCache
func (*ComplexCache) GetAvatarURL ¶
func (*ComplexCache) GetDisplayName ¶
func (*ComplexCache) GetProfileByUserID ¶
func (*ComplexCache) SetAvatarURL ¶
func (*ComplexCache) SetDefaultAvatarURL ¶
func (c *ComplexCache) SetDefaultAvatarURL(avatarURL string)
func (*ComplexCache) SetDisplayName ¶
func (*ComplexCache) SetProfile ¶
type ContextMsg ¶
type CreateContent ¶
type CreateContent struct { Creator string `json:"creator"` Federate *bool `json:"m.federate,omitempty"` IsDirect *bool `json:"is_direct,omitempty"` //used by secrect group EnableWatermark *bool `json:"enable_watermark,omitempty"` Version *int `json:"version,omitempty"` IsSecret *bool `json:"is_secret,omitempty"` EnableFavorite *bool `json:"enable_favorite,omitempty"` EnableSnapshot *bool `json:"enable_snapshot,omitempty"` EnableForward *bool `json:"enable_forward,omitempty"` IsChannel *bool `json:"is_channel,omitempty"` IsOrganizationRoom *bool `json:"is_organization_room,omitempty"` IsGroupRoom *bool `json:"is_group_room,omitempty"` RoomType *int `json:"room_type,omitempty"` }
CreateContent is the event content for http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-create
type DescContent ¶
type DescContent struct {
Desc string `json:"desc"`
}
type FedDomainInfo ¶
type FedDomains ¶
type FedDomains struct {
// contains filtered or unexported fields
}
func NewFedDomains ¶
func NewFedDomains(settings *Settings) *FedDomains
func (*FedDomains) GetAllDomainInfos ¶
func (f *FedDomains) GetAllDomainInfos() []FedDomainInfo
func (*FedDomains) GetAllFedDomains ¶
func (f *FedDomains) GetAllFedDomains() []string
func (*FedDomains) GetDomainHost ¶
func (f *FedDomains) GetDomainHost(domain string) (string, bool)
func (*FedDomains) GetDomainInfo ¶
func (f *FedDomains) GetDomainInfo(domain string) (FedDomainInfo, bool)
func (*FedDomains) LoadCache ¶
func (f *FedDomains) LoadCache()
func (*FedDomains) OnFedDomainsUpdate ¶
func (f *FedDomains) OnFedDomainsUpdate(domains []FedDomainInfo)
type GuestAccessContent ¶
type GuestAccessContent struct {
GuestAccess string `json:"guest_access"`
}
GuestAccessContent is the event content for https://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-guest-access
type HistoryVisibilityContent ¶
type HistoryVisibilityContent struct {
HistoryVisibility string `json:"history_visibility"`
}
HistoryVisibilityContent is the event content for http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-history-visibility
type Hooks ¶
type Hooks struct{}
Hooks satisfies the sqlhook.Hooks interface
func (*Hooks) After ¶
func (h *Hooks) After(ctx context.Context, query string, args ...interface{}) (context.Context, error)
After hook will get the timestamp registered on the Before hook and print the elapsed time
type ImageInfo ¶
type ImageInfo struct { Mimetype string `json:"mimetype"` Height int64 `json:"h"` Width int64 `json:"w"` Size int64 `json:"size"` }
ImageInfo implements the ImageInfo structure from http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-avatar
type JoinRulesContent ¶
type JoinRulesContent struct {
JoinRule string `json:"join_rule"`
}
JoinRulesContent is the event content for http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-join-rules
type MsgHandlerWithContext ¶
type MultiplexerMng ¶
type MultiplexerMng struct {
// contains filtered or unexported fields
}
var MultiplexerMngInsance *MultiplexerMng
type NameContent ¶
type NameContent struct {
Name string `json:"name"`
}
NameContent is the event content for https://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-name
type PowerLevelContent ¶
type PowerLevelContent struct { EventsDefault int `json:"events_default"` Invite int `json:"invite"` StateDefault int `json:"state_default"` Redact int `json:"redact"` Ban int `json:"ban"` UsersDefault int `json:"users_default"` Events map[string]int `json:"events"` Kick int `json:"kick"` Users map[string]int `json:"users"` }
PowerLevelContent is the event content for http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-power-levels
func InitialPowerLevelsContent ¶
func InitialPowerLevelsContent(roomCreator string) PowerLevelContent
InitialPowerLevelsContent returns the initial values for m.room.power_levels on room creation if they have not been specified. http://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-power-levels https://github.com/matrix-org/synapse/blob/v0.19.2/synapse/handlers/room.py#L294
type PublicKey ¶
type PublicKey struct { KeyValidityURL string `json:"key_validity_url"` PublicKey string `json:"public_key"` }
PublicKey is the PublicKeys structure in https://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-third-party-invite
type RawCache ¶
type RawCache interface { GetProfileByUserID(userID string) *authtypes.Profile GetProfileLessByUserID(userID string) (string, string, bool) GetAvatarURLByUser(userID string) (string, bool) GetDisplayNameByUser(userID string) (string, bool) SetProfile(userID, displayName, avatar string) error ExpireProfile(userID string) error DelProfile(userID string) error DelAvatar(userID string) error DelDisplayName(userID string) error }
type RpcCB ¶
type RpcCB interface { GetTopic() string //GetCB() nats.MsgHandler GetCB() MsgHandlerWithContext Clean() }
type RpcClient ¶
type RpcClient struct {
// contains filtered or unexported fields
}
func NewRpcClient ¶
func NewRpcClient(url string, idg *uid.UidGenerator) *RpcClient
func (*RpcClient) Pub ¶
TODO: is it necessary to add context/span/monitor like RequestWithContext for Pub()?
func (*RpcClient) PubObj ¶
TODO: is it necessary to add context/span/monitor like RequestWithContext for PubObj()?
func (*RpcClient) ReplyGrpWithContext ¶
func (nc *RpcClient) ReplyGrpWithContext(topic, grp string, handler MsgHandlerWithContext)
func (*RpcClient) ReplyWithContext ¶
func (nc *RpcClient) ReplyWithContext(topic string, handler MsgHandlerWithContext)
func (*RpcClient) Request ¶
Request is used for rpc client, Reply/ReplyGrp is used for rpc server, SubRaw is used for rpc client but now is deprecated
func (*RpcClient) RequestWithContext ¶
func (nc *RpcClient) RequestWithContext(ctx context.Context, topic string, bytes []byte, timeout int) ([]byte, error)
must be careful to use RequestWithContext, because some nats rpc server dose not support parseNatsData!!!
func (*RpcClient) Unsubscribe ¶
type SettingCache ¶
type Settings ¶
type Settings struct {
// contains filtered or unexported fields
}
func NewSettings ¶
func NewSettings(cache SettingCache) *Settings
func (*Settings) GetAutoLogoutTime ¶
func (*Settings) GetFederationDomains ¶
func (c *Settings) GetFederationDomains() (ret []FedDomainInfo)
func (*Settings) GetMessageVisilibityTime ¶
func (*Settings) RegisterFederationDomainsUpdateCallback ¶
func (c *Settings) RegisterFederationDomainsUpdateCallback(cb func([]FedDomainInfo))
func (*Settings) UpdateSetting ¶
type SettingsConsumer ¶
type SettingsConsumer struct {
// contains filtered or unexported fields
}
func NewSettingConsumer ¶
func NewSettingConsumer(underlying, name string, settings *Settings) *SettingsConsumer
func (*SettingsConsumer) Start ¶
func (c *SettingsConsumer) Start() error
type ThirdPartyInviteContent ¶
type ThirdPartyInviteContent struct { DisplayName string `json:"display_name"` KeyValidityURL string `json:"key_validity_url"` PublicKey string `json:"public_key"` PublicKeys []PublicKey `json:"public_keys"` }
ThirdPartyInviteContent is the content event for https://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-third-party-invite
type TopicContent ¶
type TopicContent struct {
Topic string `json:"topic"`
}
TopicContent is the event content for https://matrix.org/docs/spec/client_server/r0.2.0.html#m-room-topic
type Transaction ¶
type Transaction interface { // Commit the transaction Commit() error // Rollback the transaction. Rollback() error }
A Transaction is something that can be committed or rolledback.
type VisibilityContent ¶
type VisibilityContent struct {
Visibility string `json:"visibility"`
}