user

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2024 License: MIT Imports: 19 Imported by: 2

Documentation

Index

Constants

View Source
const APIPathPrefix = "/twirp/user.API/"

APIPathPrefix is a convenience constant that may identify URL paths. Should be used with caution, it only matches routes generated by Twirp Go clients, with the default "/twirp" prefix and default CamelCase service and method names. More info: https://twitchtv.github.io/twirp/docs/routing.html

Variables

View Source
var File_pbf_user_api_proto protoreflect.FileDescriptor
View Source
var File_pbf_user_create_proto protoreflect.FileDescriptor
View Source
var File_pbf_user_delete_proto protoreflect.FileDescriptor
View Source
var File_pbf_user_search_proto protoreflect.FileDescriptor
View Source
var File_pbf_user_update_proto protoreflect.FileDescriptor

Functions

func WriteError

func WriteError(resp http.ResponseWriter, err error)

WriteError writes an HTTP response with a valid Twirp error format (code, msg, meta). Useful outside of the Twirp server (e.g. http middleware), but does not trigger hooks. If err is not a twirp.Error, it will get wrapped with twirp.InternalErrorWith(err)

Types

type API

type API interface {
	Create(context.Context, *CreateI) (*CreateO, error)

	Delete(context.Context, *DeleteI) (*DeleteO, error)

	Search(context.Context, *SearchI) (*SearchO, error)

	Update(context.Context, *UpdateI) (*UpdateO, error)
}

func NewAPIJSONClient

func NewAPIJSONClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) API

NewAPIJSONClient creates a JSON client that implements the API interface. It communicates using JSON and can be configured with a custom HTTPClient.

func NewAPIProtobufClient

func NewAPIProtobufClient(baseURL string, client HTTPClient, opts ...twirp.ClientOption) API

NewAPIProtobufClient creates a Protobuf client that implements the API interface. It communicates using Protobuf and can be configured with a custom HTTPClient.

type CreateI

type CreateI struct {
	Filter *CreateI_Filter   `protobuf:"bytes,100,opt,name=filter,proto3" json:"filter,omitempty"`
	Object []*CreateI_Object `protobuf:"bytes,200,rep,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

CreateI is the input for creating users.

{
    "object": [
        {
            "public": {
                "image": "https://gravatar.com/9050f8ea",
                "name": "xh3b4sd"
            }
        }
    ]
}

func (*CreateI) Descriptor deprecated

func (*CreateI) Descriptor() ([]byte, []int)

Deprecated: Use CreateI.ProtoReflect.Descriptor instead.

func (*CreateI) GetFilter

func (x *CreateI) GetFilter() *CreateI_Filter

func (*CreateI) GetObject

func (x *CreateI) GetObject() []*CreateI_Object

func (*CreateI) ProtoMessage

func (*CreateI) ProtoMessage()

func (*CreateI) ProtoReflect

func (x *CreateI) ProtoReflect() protoreflect.Message

func (*CreateI) Reset

func (x *CreateI) Reset()

func (*CreateI) String

func (x *CreateI) String() string

type CreateI_Filter

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

func (*CreateI_Filter) Descriptor deprecated

func (*CreateI_Filter) Descriptor() ([]byte, []int)

Deprecated: Use CreateI_Filter.ProtoReflect.Descriptor instead.

func (*CreateI_Filter) ProtoMessage

func (*CreateI_Filter) ProtoMessage()

func (*CreateI_Filter) ProtoReflect

func (x *CreateI_Filter) ProtoReflect() protoreflect.Message

func (*CreateI_Filter) Reset

func (x *CreateI_Filter) Reset()

func (*CreateI_Filter) String

func (x *CreateI_Filter) String() string

type CreateI_Object

type CreateI_Object struct {
	Intern *CreateI_Object_Intern `protobuf:"bytes,100,opt,name=intern,proto3" json:"intern,omitempty"`
	Public *CreateI_Object_Public `protobuf:"bytes,200,opt,name=public,proto3" json:"public,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateI_Object) Descriptor deprecated

func (*CreateI_Object) Descriptor() ([]byte, []int)

Deprecated: Use CreateI_Object.ProtoReflect.Descriptor instead.

func (*CreateI_Object) GetIntern

func (x *CreateI_Object) GetIntern() *CreateI_Object_Intern

func (*CreateI_Object) GetPublic

func (x *CreateI_Object) GetPublic() *CreateI_Object_Public

func (*CreateI_Object) ProtoMessage

func (*CreateI_Object) ProtoMessage()

func (*CreateI_Object) ProtoReflect

func (x *CreateI_Object) ProtoReflect() protoreflect.Message

func (*CreateI_Object) Reset

func (x *CreateI_Object) Reset()

func (*CreateI_Object) String

func (x *CreateI_Object) String() string

type CreateI_Object_Intern

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

func (*CreateI_Object_Intern) Descriptor deprecated

func (*CreateI_Object_Intern) Descriptor() ([]byte, []int)

Deprecated: Use CreateI_Object_Intern.ProtoReflect.Descriptor instead.

func (*CreateI_Object_Intern) ProtoMessage

func (*CreateI_Object_Intern) ProtoMessage()

func (*CreateI_Object_Intern) ProtoReflect

func (x *CreateI_Object_Intern) ProtoReflect() protoreflect.Message

func (*CreateI_Object_Intern) Reset

func (x *CreateI_Object_Intern) Reset()

func (*CreateI_Object_Intern) String

func (x *CreateI_Object_Intern) String() string

type CreateI_Object_Public

type CreateI_Object_Public struct {

	// image is the URL pointing to the user's profile picture.
	Image string `protobuf:"bytes,100,opt,name=image,proto3" json:"image,omitempty"`
	// name is the user name.
	Name string `protobuf:"bytes,200,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateI_Object_Public) Descriptor deprecated

func (*CreateI_Object_Public) Descriptor() ([]byte, []int)

Deprecated: Use CreateI_Object_Public.ProtoReflect.Descriptor instead.

func (*CreateI_Object_Public) GetImage

func (x *CreateI_Object_Public) GetImage() string

func (*CreateI_Object_Public) GetName

func (x *CreateI_Object_Public) GetName() string

func (*CreateI_Object_Public) ProtoMessage

func (*CreateI_Object_Public) ProtoMessage()

func (*CreateI_Object_Public) ProtoReflect

func (x *CreateI_Object_Public) ProtoReflect() protoreflect.Message

func (*CreateI_Object_Public) Reset

func (x *CreateI_Object_Public) Reset()

func (*CreateI_Object_Public) String

func (x *CreateI_Object_Public) String() string

type CreateO

type CreateO struct {
	Filter *CreateO_Filter   `protobuf:"bytes,100,opt,name=filter,proto3" json:"filter,omitempty"`
	Object []*CreateO_Object `protobuf:"bytes,200,rep,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

CreateO is the output for creating users.

{
    "object": [
        {
            "intern": {
                "created": "1689001255",
                "id": "551265"
            }
        }
    ]
}

func (*CreateO) Descriptor deprecated

func (*CreateO) Descriptor() ([]byte, []int)

Deprecated: Use CreateO.ProtoReflect.Descriptor instead.

func (*CreateO) GetFilter

func (x *CreateO) GetFilter() *CreateO_Filter

func (*CreateO) GetObject

func (x *CreateO) GetObject() []*CreateO_Object

func (*CreateO) ProtoMessage

func (*CreateO) ProtoMessage()

func (*CreateO) ProtoReflect

func (x *CreateO) ProtoReflect() protoreflect.Message

func (*CreateO) Reset

func (x *CreateO) Reset()

func (*CreateO) String

func (x *CreateO) String() string

type CreateO_Filter

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

func (*CreateO_Filter) Descriptor deprecated

func (*CreateO_Filter) Descriptor() ([]byte, []int)

Deprecated: Use CreateO_Filter.ProtoReflect.Descriptor instead.

func (*CreateO_Filter) ProtoMessage

func (*CreateO_Filter) ProtoMessage()

func (*CreateO_Filter) ProtoReflect

func (x *CreateO_Filter) ProtoReflect() protoreflect.Message

func (*CreateO_Filter) Reset

func (x *CreateO_Filter) Reset()

func (*CreateO_Filter) String

func (x *CreateO_Filter) String() string

type CreateO_Object

type CreateO_Object struct {
	Intern *CreateO_Object_Intern `protobuf:"bytes,100,opt,name=intern,proto3" json:"intern,omitempty"`
	Public *CreateO_Object_Public `protobuf:"bytes,200,opt,name=public,proto3" json:"public,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateO_Object) Descriptor deprecated

func (*CreateO_Object) Descriptor() ([]byte, []int)

Deprecated: Use CreateO_Object.ProtoReflect.Descriptor instead.

func (*CreateO_Object) GetIntern

func (x *CreateO_Object) GetIntern() *CreateO_Object_Intern

func (*CreateO_Object) GetPublic

func (x *CreateO_Object) GetPublic() *CreateO_Object_Public

func (*CreateO_Object) ProtoMessage

func (*CreateO_Object) ProtoMessage()

func (*CreateO_Object) ProtoReflect

func (x *CreateO_Object) ProtoReflect() protoreflect.Message

func (*CreateO_Object) Reset

func (x *CreateO_Object) Reset()

func (*CreateO_Object) String

func (x *CreateO_Object) String() string

type CreateO_Object_Intern

type CreateO_Object_Intern struct {

	// created is the unix timestamp in seconds at which the user got created.
	Created string `protobuf:"bytes,100,opt,name=created,proto3" json:"created,omitempty"`
	// id is the ID of the user being created.
	Id string `protobuf:"bytes,200,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*CreateO_Object_Intern) Descriptor deprecated

func (*CreateO_Object_Intern) Descriptor() ([]byte, []int)

Deprecated: Use CreateO_Object_Intern.ProtoReflect.Descriptor instead.

func (*CreateO_Object_Intern) GetCreated

func (x *CreateO_Object_Intern) GetCreated() string

func (*CreateO_Object_Intern) GetId

func (x *CreateO_Object_Intern) GetId() string

func (*CreateO_Object_Intern) ProtoMessage

func (*CreateO_Object_Intern) ProtoMessage()

func (*CreateO_Object_Intern) ProtoReflect

func (x *CreateO_Object_Intern) ProtoReflect() protoreflect.Message

func (*CreateO_Object_Intern) Reset

func (x *CreateO_Object_Intern) Reset()

func (*CreateO_Object_Intern) String

func (x *CreateO_Object_Intern) String() string

type CreateO_Object_Public

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

func (*CreateO_Object_Public) Descriptor deprecated

func (*CreateO_Object_Public) Descriptor() ([]byte, []int)

Deprecated: Use CreateO_Object_Public.ProtoReflect.Descriptor instead.

func (*CreateO_Object_Public) ProtoMessage

func (*CreateO_Object_Public) ProtoMessage()

func (*CreateO_Object_Public) ProtoReflect

func (x *CreateO_Object_Public) ProtoReflect() protoreflect.Message

func (*CreateO_Object_Public) Reset

func (x *CreateO_Object_Public) Reset()

func (*CreateO_Object_Public) String

func (x *CreateO_Object_Public) String() string

type DeleteI

type DeleteI struct {
	Filter *DeleteI_Filter   `protobuf:"bytes,100,opt,name=filter,proto3" json:"filter,omitempty"`
	Object []*DeleteI_Object `protobuf:"bytes,200,rep,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

DeleteI is the input for deleting users.

{
    "object": [
        {
            "intern": {
                "id": "551265"
            }
        }
    ]
}

func (*DeleteI) Descriptor deprecated

func (*DeleteI) Descriptor() ([]byte, []int)

Deprecated: Use DeleteI.ProtoReflect.Descriptor instead.

func (*DeleteI) GetFilter

func (x *DeleteI) GetFilter() *DeleteI_Filter

func (*DeleteI) GetObject

func (x *DeleteI) GetObject() []*DeleteI_Object

func (*DeleteI) ProtoMessage

func (*DeleteI) ProtoMessage()

func (*DeleteI) ProtoReflect

func (x *DeleteI) ProtoReflect() protoreflect.Message

func (*DeleteI) Reset

func (x *DeleteI) Reset()

func (*DeleteI) String

func (x *DeleteI) String() string

type DeleteI_Filter

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

func (*DeleteI_Filter) Descriptor deprecated

func (*DeleteI_Filter) Descriptor() ([]byte, []int)

Deprecated: Use DeleteI_Filter.ProtoReflect.Descriptor instead.

func (*DeleteI_Filter) ProtoMessage

func (*DeleteI_Filter) ProtoMessage()

func (*DeleteI_Filter) ProtoReflect

func (x *DeleteI_Filter) ProtoReflect() protoreflect.Message

func (*DeleteI_Filter) Reset

func (x *DeleteI_Filter) Reset()

func (*DeleteI_Filter) String

func (x *DeleteI_Filter) String() string

type DeleteI_Object

type DeleteI_Object struct {
	Intern *DeleteI_Object_Intern `protobuf:"bytes,100,opt,name=intern,proto3" json:"intern,omitempty"`
	Public *DeleteI_Object_Public `protobuf:"bytes,200,opt,name=public,proto3" json:"public,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteI_Object) Descriptor deprecated

func (*DeleteI_Object) Descriptor() ([]byte, []int)

Deprecated: Use DeleteI_Object.ProtoReflect.Descriptor instead.

func (*DeleteI_Object) GetIntern

func (x *DeleteI_Object) GetIntern() *DeleteI_Object_Intern

func (*DeleteI_Object) GetPublic

func (x *DeleteI_Object) GetPublic() *DeleteI_Object_Public

func (*DeleteI_Object) ProtoMessage

func (*DeleteI_Object) ProtoMessage()

func (*DeleteI_Object) ProtoReflect

func (x *DeleteI_Object) ProtoReflect() protoreflect.Message

func (*DeleteI_Object) Reset

func (x *DeleteI_Object) Reset()

func (*DeleteI_Object) String

func (x *DeleteI_Object) String() string

type DeleteI_Object_Intern

type DeleteI_Object_Intern struct {

	// id is the ID of the user being deleted.
	Id string `protobuf:"bytes,100,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteI_Object_Intern) Descriptor deprecated

func (*DeleteI_Object_Intern) Descriptor() ([]byte, []int)

Deprecated: Use DeleteI_Object_Intern.ProtoReflect.Descriptor instead.

func (*DeleteI_Object_Intern) GetId

func (x *DeleteI_Object_Intern) GetId() string

func (*DeleteI_Object_Intern) ProtoMessage

func (*DeleteI_Object_Intern) ProtoMessage()

func (*DeleteI_Object_Intern) ProtoReflect

func (x *DeleteI_Object_Intern) ProtoReflect() protoreflect.Message

func (*DeleteI_Object_Intern) Reset

func (x *DeleteI_Object_Intern) Reset()

func (*DeleteI_Object_Intern) String

func (x *DeleteI_Object_Intern) String() string

type DeleteI_Object_Public

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

func (*DeleteI_Object_Public) Descriptor deprecated

func (*DeleteI_Object_Public) Descriptor() ([]byte, []int)

Deprecated: Use DeleteI_Object_Public.ProtoReflect.Descriptor instead.

func (*DeleteI_Object_Public) ProtoMessage

func (*DeleteI_Object_Public) ProtoMessage()

func (*DeleteI_Object_Public) ProtoReflect

func (x *DeleteI_Object_Public) ProtoReflect() protoreflect.Message

func (*DeleteI_Object_Public) Reset

func (x *DeleteI_Object_Public) Reset()

func (*DeleteI_Object_Public) String

func (x *DeleteI_Object_Public) String() string

type DeleteO

type DeleteO struct {
	Filter *DeleteO_Filter   `protobuf:"bytes,100,opt,name=filter,proto3" json:"filter,omitempty"`
	Object []*DeleteO_Object `protobuf:"bytes,200,rep,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

DeleteO is the output for deleting users.

{
    "object": [
        {
            "intern": {
                "status": "deleted"
            }
        }
    ]
}

func (*DeleteO) Descriptor deprecated

func (*DeleteO) Descriptor() ([]byte, []int)

Deprecated: Use DeleteO.ProtoReflect.Descriptor instead.

func (*DeleteO) GetFilter

func (x *DeleteO) GetFilter() *DeleteO_Filter

func (*DeleteO) GetObject

func (x *DeleteO) GetObject() []*DeleteO_Object

func (*DeleteO) ProtoMessage

func (*DeleteO) ProtoMessage()

func (*DeleteO) ProtoReflect

func (x *DeleteO) ProtoReflect() protoreflect.Message

func (*DeleteO) Reset

func (x *DeleteO) Reset()

func (*DeleteO) String

func (x *DeleteO) String() string

type DeleteO_Filter

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

func (*DeleteO_Filter) Descriptor deprecated

func (*DeleteO_Filter) Descriptor() ([]byte, []int)

Deprecated: Use DeleteO_Filter.ProtoReflect.Descriptor instead.

func (*DeleteO_Filter) ProtoMessage

func (*DeleteO_Filter) ProtoMessage()

func (*DeleteO_Filter) ProtoReflect

func (x *DeleteO_Filter) ProtoReflect() protoreflect.Message

func (*DeleteO_Filter) Reset

func (x *DeleteO_Filter) Reset()

func (*DeleteO_Filter) String

func (x *DeleteO_Filter) String() string

type DeleteO_Object

type DeleteO_Object struct {
	Intern *DeleteO_Object_Intern `protobuf:"bytes,100,opt,name=intern,proto3" json:"intern,omitempty"`
	Public *DeleteO_Object_Public `protobuf:"bytes,200,opt,name=public,proto3" json:"public,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteO_Object) Descriptor deprecated

func (*DeleteO_Object) Descriptor() ([]byte, []int)

Deprecated: Use DeleteO_Object.ProtoReflect.Descriptor instead.

func (*DeleteO_Object) GetIntern

func (x *DeleteO_Object) GetIntern() *DeleteO_Object_Intern

func (*DeleteO_Object) GetPublic

func (x *DeleteO_Object) GetPublic() *DeleteO_Object_Public

func (*DeleteO_Object) ProtoMessage

func (*DeleteO_Object) ProtoMessage()

func (*DeleteO_Object) ProtoReflect

func (x *DeleteO_Object) ProtoReflect() protoreflect.Message

func (*DeleteO_Object) Reset

func (x *DeleteO_Object) Reset()

func (*DeleteO_Object) String

func (x *DeleteO_Object) String() string

type DeleteO_Object_Intern

type DeleteO_Object_Intern struct {

	// status is the resource status upon successful user deletion.
	Status string `protobuf:"bytes,100,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*DeleteO_Object_Intern) Descriptor deprecated

func (*DeleteO_Object_Intern) Descriptor() ([]byte, []int)

Deprecated: Use DeleteO_Object_Intern.ProtoReflect.Descriptor instead.

func (*DeleteO_Object_Intern) GetStatus

func (x *DeleteO_Object_Intern) GetStatus() string

func (*DeleteO_Object_Intern) ProtoMessage

func (*DeleteO_Object_Intern) ProtoMessage()

func (*DeleteO_Object_Intern) ProtoReflect

func (x *DeleteO_Object_Intern) ProtoReflect() protoreflect.Message

func (*DeleteO_Object_Intern) Reset

func (x *DeleteO_Object_Intern) Reset()

func (*DeleteO_Object_Intern) String

func (x *DeleteO_Object_Intern) String() string

type DeleteO_Object_Public

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

func (*DeleteO_Object_Public) Descriptor deprecated

func (*DeleteO_Object_Public) Descriptor() ([]byte, []int)

Deprecated: Use DeleteO_Object_Public.ProtoReflect.Descriptor instead.

func (*DeleteO_Object_Public) ProtoMessage

func (*DeleteO_Object_Public) ProtoMessage()

func (*DeleteO_Object_Public) ProtoReflect

func (x *DeleteO_Object_Public) ProtoReflect() protoreflect.Message

func (*DeleteO_Object_Public) Reset

func (x *DeleteO_Object_Public) Reset()

func (*DeleteO_Object_Public) String

func (x *DeleteO_Object_Public) String() string

type HTTPClient

type HTTPClient interface {
	Do(req *http.Request) (*http.Response, error)
}

HTTPClient is the interface used by generated clients to send HTTP requests. It is fulfilled by *(net/http).Client, which is sufficient for most users. Users can provide their own implementation for special retry policies.

HTTPClient implementations should not follow redirects. Redirects are automatically disabled if *(net/http).Client is passed to client constructors. See the withoutRedirects function in this file for more details.

type SearchI

type SearchI struct {
	Filter *SearchI_Filter   `protobuf:"bytes,100,opt,name=filter,proto3" json:"filter,omitempty"`
	Object []*SearchI_Object `protobuf:"bytes,200,rep,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

SearchI is the input for searching users.

{
    "filter": {
        "paging": {
            "kind": "page",
            "start": "0",
            "stop": "49"
        }
    },
    "object": [
        {
            "intern": {
                "id": "551265"
            }
        }
    ]
}

func (*SearchI) Descriptor deprecated

func (*SearchI) Descriptor() ([]byte, []int)

Deprecated: Use SearchI.ProtoReflect.Descriptor instead.

func (*SearchI) GetFilter

func (x *SearchI) GetFilter() *SearchI_Filter

func (*SearchI) GetObject

func (x *SearchI) GetObject() []*SearchI_Object

func (*SearchI) ProtoMessage

func (*SearchI) ProtoMessage()

func (*SearchI) ProtoReflect

func (x *SearchI) ProtoReflect() protoreflect.Message

func (*SearchI) Reset

func (x *SearchI) Reset()

func (*SearchI) String

func (x *SearchI) String() string

type SearchI_Filter

type SearchI_Filter struct {
	Paging *SearchI_Filter_Paging `protobuf:"bytes,100,opt,name=paging,proto3" json:"paging,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchI_Filter) Descriptor deprecated

func (*SearchI_Filter) Descriptor() ([]byte, []int)

Deprecated: Use SearchI_Filter.ProtoReflect.Descriptor instead.

func (*SearchI_Filter) GetPaging

func (x *SearchI_Filter) GetPaging() *SearchI_Filter_Paging

func (*SearchI_Filter) ProtoMessage

func (*SearchI_Filter) ProtoMessage()

func (*SearchI_Filter) ProtoReflect

func (x *SearchI_Filter) ProtoReflect() protoreflect.Message

func (*SearchI_Filter) Reset

func (x *SearchI_Filter) Reset()

func (*SearchI_Filter) String

func (x *SearchI_Filter) String() string

type SearchI_Filter_Paging

type SearchI_Filter_Paging struct {
	Kind  string `protobuf:"bytes,100,opt,name=kind,proto3" json:"kind,omitempty"`
	Start string `protobuf:"bytes,200,opt,name=start,proto3" json:"start,omitempty"`
	Stop  string `protobuf:"bytes,300,opt,name=stop,proto3" json:"stop,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchI_Filter_Paging) Descriptor deprecated

func (*SearchI_Filter_Paging) Descriptor() ([]byte, []int)

Deprecated: Use SearchI_Filter_Paging.ProtoReflect.Descriptor instead.

func (*SearchI_Filter_Paging) GetKind

func (x *SearchI_Filter_Paging) GetKind() string

func (*SearchI_Filter_Paging) GetStart

func (x *SearchI_Filter_Paging) GetStart() string

func (*SearchI_Filter_Paging) GetStop

func (x *SearchI_Filter_Paging) GetStop() string

func (*SearchI_Filter_Paging) ProtoMessage

func (*SearchI_Filter_Paging) ProtoMessage()

func (*SearchI_Filter_Paging) ProtoReflect

func (x *SearchI_Filter_Paging) ProtoReflect() protoreflect.Message

func (*SearchI_Filter_Paging) Reset

func (x *SearchI_Filter_Paging) Reset()

func (*SearchI_Filter_Paging) String

func (x *SearchI_Filter_Paging) String() string

type SearchI_Object

type SearchI_Object struct {
	Intern *SearchI_Object_Intern `protobuf:"bytes,100,opt,name=intern,proto3" json:"intern,omitempty"`
	Public *SearchI_Object_Public `protobuf:"bytes,200,opt,name=public,proto3" json:"public,omitempty"`
	Symbol *SearchI_Object_Symbol `protobuf:"bytes,300,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchI_Object) Descriptor deprecated

func (*SearchI_Object) Descriptor() ([]byte, []int)

Deprecated: Use SearchI_Object.ProtoReflect.Descriptor instead.

func (*SearchI_Object) GetIntern

func (x *SearchI_Object) GetIntern() *SearchI_Object_Intern

func (*SearchI_Object) GetPublic

func (x *SearchI_Object) GetPublic() *SearchI_Object_Public

func (*SearchI_Object) GetSymbol

func (x *SearchI_Object) GetSymbol() *SearchI_Object_Symbol

func (*SearchI_Object) ProtoMessage

func (*SearchI_Object) ProtoMessage()

func (*SearchI_Object) ProtoReflect

func (x *SearchI_Object) ProtoReflect() protoreflect.Message

func (*SearchI_Object) Reset

func (x *SearchI_Object) Reset()

func (*SearchI_Object) String

func (x *SearchI_Object) String() string

type SearchI_Object_Intern

type SearchI_Object_Intern struct {

	// id is the ID of the user being searched. id set to "self" returns the
	// current user sending the request, based on the given authorization
	// parameters. Given an OAuth access token, its encoded subject claim may
	// refer to the internally persisted user object.
	Id string `protobuf:"bytes,100,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchI_Object_Intern) Descriptor deprecated

func (*SearchI_Object_Intern) Descriptor() ([]byte, []int)

Deprecated: Use SearchI_Object_Intern.ProtoReflect.Descriptor instead.

func (*SearchI_Object_Intern) GetId

func (x *SearchI_Object_Intern) GetId() string

func (*SearchI_Object_Intern) ProtoMessage

func (*SearchI_Object_Intern) ProtoMessage()

func (*SearchI_Object_Intern) ProtoReflect

func (x *SearchI_Object_Intern) ProtoReflect() protoreflect.Message

func (*SearchI_Object_Intern) Reset

func (x *SearchI_Object_Intern) Reset()

func (*SearchI_Object_Intern) String

func (x *SearchI_Object_Intern) String() string

type SearchI_Object_Public

type SearchI_Object_Public struct {

	// name is the name of the user being searched.
	Name string `protobuf:"bytes,100,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchI_Object_Public) Descriptor deprecated

func (*SearchI_Object_Public) Descriptor() ([]byte, []int)

Deprecated: Use SearchI_Object_Public.ProtoReflect.Descriptor instead.

func (*SearchI_Object_Public) GetName

func (x *SearchI_Object_Public) GetName() string

func (*SearchI_Object_Public) ProtoMessage

func (*SearchI_Object_Public) ProtoMessage()

func (*SearchI_Object_Public) ProtoReflect

func (x *SearchI_Object_Public) ProtoReflect() protoreflect.Message

func (*SearchI_Object_Public) Reset

func (x *SearchI_Object_Public) Reset()

func (*SearchI_Object_Public) String

func (x *SearchI_Object_Public) String() string

type SearchI_Object_Symbol

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

func (*SearchI_Object_Symbol) Descriptor deprecated

func (*SearchI_Object_Symbol) Descriptor() ([]byte, []int)

Deprecated: Use SearchI_Object_Symbol.ProtoReflect.Descriptor instead.

func (*SearchI_Object_Symbol) ProtoMessage

func (*SearchI_Object_Symbol) ProtoMessage()

func (*SearchI_Object_Symbol) ProtoReflect

func (x *SearchI_Object_Symbol) ProtoReflect() protoreflect.Message

func (*SearchI_Object_Symbol) Reset

func (x *SearchI_Object_Symbol) Reset()

func (*SearchI_Object_Symbol) String

func (x *SearchI_Object_Symbol) String() string

type SearchO

type SearchO struct {
	Filter *SearchO_Filter   `protobuf:"bytes,100,opt,name=filter,proto3" json:"filter,omitempty"`
	Object []*SearchO_Object `protobuf:"bytes,200,rep,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

SearchO is the output for searching users.

{
    "object": [
        {
            "intern": {
                "created": "1689001255",
                "id": "551265"
            },
            "public": {
                "image": "https://gravatar.com/9050f8ea",
                "name": "xh3b4sd"
            }
        },
        ...
    ]
}

func (*SearchO) Descriptor deprecated

func (*SearchO) Descriptor() ([]byte, []int)

Deprecated: Use SearchO.ProtoReflect.Descriptor instead.

func (*SearchO) GetFilter

func (x *SearchO) GetFilter() *SearchO_Filter

func (*SearchO) GetObject

func (x *SearchO) GetObject() []*SearchO_Object

func (*SearchO) ProtoMessage

func (*SearchO) ProtoMessage()

func (*SearchO) ProtoReflect

func (x *SearchO) ProtoReflect() protoreflect.Message

func (*SearchO) Reset

func (x *SearchO) Reset()

func (*SearchO) String

func (x *SearchO) String() string

type SearchO_Filter

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

func (*SearchO_Filter) Descriptor deprecated

func (*SearchO_Filter) Descriptor() ([]byte, []int)

Deprecated: Use SearchO_Filter.ProtoReflect.Descriptor instead.

func (*SearchO_Filter) ProtoMessage

func (*SearchO_Filter) ProtoMessage()

func (*SearchO_Filter) ProtoReflect

func (x *SearchO_Filter) ProtoReflect() protoreflect.Message

func (*SearchO_Filter) Reset

func (x *SearchO_Filter) Reset()

func (*SearchO_Filter) String

func (x *SearchO_Filter) String() string

type SearchO_Object

type SearchO_Object struct {
	Extern *SearchO_Object_Extern `protobuf:"bytes,100,opt,name=extern,proto3" json:"extern,omitempty"`
	Intern *SearchO_Object_Intern `protobuf:"bytes,200,opt,name=intern,proto3" json:"intern,omitempty"`
	Public *SearchO_Object_Public `protobuf:"bytes,300,opt,name=public,proto3" json:"public,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchO_Object) Descriptor deprecated

func (*SearchO_Object) Descriptor() ([]byte, []int)

Deprecated: Use SearchO_Object.ProtoReflect.Descriptor instead.

func (*SearchO_Object) GetExtern added in v0.1.11

func (x *SearchO_Object) GetExtern() *SearchO_Object_Extern

func (*SearchO_Object) GetIntern

func (x *SearchO_Object) GetIntern() *SearchO_Object_Intern

func (*SearchO_Object) GetPublic

func (x *SearchO_Object) GetPublic() *SearchO_Object_Public

func (*SearchO_Object) ProtoMessage

func (*SearchO_Object) ProtoMessage()

func (*SearchO_Object) ProtoReflect

func (x *SearchO_Object) ProtoReflect() protoreflect.Message

func (*SearchO_Object) Reset

func (x *SearchO_Object) Reset()

func (*SearchO_Object) String

func (x *SearchO_Object) String() string

type SearchO_Object_Extern added in v0.1.11

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

func (*SearchO_Object_Extern) Descriptor deprecated added in v0.1.11

func (*SearchO_Object_Extern) Descriptor() ([]byte, []int)

Deprecated: Use SearchO_Object_Extern.ProtoReflect.Descriptor instead.

func (*SearchO_Object_Extern) ProtoMessage added in v0.1.11

func (*SearchO_Object_Extern) ProtoMessage()

func (*SearchO_Object_Extern) ProtoReflect added in v0.1.11

func (x *SearchO_Object_Extern) ProtoReflect() protoreflect.Message

func (*SearchO_Object_Extern) Reset added in v0.1.11

func (x *SearchO_Object_Extern) Reset()

func (*SearchO_Object_Extern) String added in v0.1.11

func (x *SearchO_Object_Extern) String() string

type SearchO_Object_Intern

type SearchO_Object_Intern struct {

	// created is the unix timestamp in seconds at which the event got created.
	Created string `protobuf:"bytes,100,opt,name=created,proto3" json:"created,omitempty"`
	// id is the ID of the user being searched.
	Id string `protobuf:"bytes,200,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchO_Object_Intern) Descriptor deprecated

func (*SearchO_Object_Intern) Descriptor() ([]byte, []int)

Deprecated: Use SearchO_Object_Intern.ProtoReflect.Descriptor instead.

func (*SearchO_Object_Intern) GetCreated

func (x *SearchO_Object_Intern) GetCreated() string

func (*SearchO_Object_Intern) GetId

func (x *SearchO_Object_Intern) GetId() string

func (*SearchO_Object_Intern) ProtoMessage

func (*SearchO_Object_Intern) ProtoMessage()

func (*SearchO_Object_Intern) ProtoReflect

func (x *SearchO_Object_Intern) ProtoReflect() protoreflect.Message

func (*SearchO_Object_Intern) Reset

func (x *SearchO_Object_Intern) Reset()

func (*SearchO_Object_Intern) String

func (x *SearchO_Object_Intern) String() string

type SearchO_Object_Public

type SearchO_Object_Public struct {

	// image is the URL pointing to the user's profile picture.
	Image string `protobuf:"bytes,100,opt,name=image,proto3" json:"image,omitempty"`
	// name is the user name.
	Name string `protobuf:"bytes,200,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*SearchO_Object_Public) Descriptor deprecated

func (*SearchO_Object_Public) Descriptor() ([]byte, []int)

Deprecated: Use SearchO_Object_Public.ProtoReflect.Descriptor instead.

func (*SearchO_Object_Public) GetImage

func (x *SearchO_Object_Public) GetImage() string

func (*SearchO_Object_Public) GetName

func (x *SearchO_Object_Public) GetName() string

func (*SearchO_Object_Public) ProtoMessage

func (*SearchO_Object_Public) ProtoMessage()

func (*SearchO_Object_Public) ProtoReflect

func (x *SearchO_Object_Public) ProtoReflect() protoreflect.Message

func (*SearchO_Object_Public) Reset

func (x *SearchO_Object_Public) Reset()

func (*SearchO_Object_Public) String

func (x *SearchO_Object_Public) String() string

type TwirpServer

type TwirpServer interface {
	http.Handler

	// ServiceDescriptor returns gzipped bytes describing the .proto file that
	// this service was generated from. Once unzipped, the bytes can be
	// unmarshalled as a
	// google.golang.org/protobuf/types/descriptorpb.FileDescriptorProto.
	//
	// The returned integer is the index of this particular service within that
	// FileDescriptorProto's 'Service' slice of ServiceDescriptorProtos. This is a
	// low-level field, expected to be used for reflection.
	ServiceDescriptor() ([]byte, int)

	// ProtocGenTwirpVersion is the semantic version string of the version of
	// twirp used to generate this file.
	ProtocGenTwirpVersion() string

	// PathPrefix returns the HTTP URL path prefix for all methods handled by this
	// service. This can be used with an HTTP mux to route Twirp requests.
	// The path prefix is in the form: "/<prefix>/<package>.<Service>/"
	// that is, everything in a Twirp route except for the <Method> at the end.
	PathPrefix() string
}

TwirpServer is the interface generated server structs will support: they're HTTP handlers with additional methods for accessing metadata about the service. Those accessors are a low-level API for building reflection tools. Most people can think of TwirpServers as just http.Handlers.

func NewAPIServer

func NewAPIServer(svc API, opts ...interface{}) TwirpServer

NewAPIServer builds a TwirpServer that can be used as an http.Handler to handle HTTP requests that are routed to the right method in the provided svc implementation. The opts are twirp.ServerOption modifiers, for example twirp.WithServerHooks(hooks).

type UpdateI

type UpdateI struct {
	Filter *UpdateI_Filter   `protobuf:"bytes,100,opt,name=filter,proto3" json:"filter,omitempty"`
	Object []*UpdateI_Object `protobuf:"bytes,200,rep,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

UpdateI is the input for updating users.

{
    "object": [
        {
            "intern": {
                "id": "551265"
            },
            "public": {
                "name": "xh3"
            }
        }
    ]
}

func (*UpdateI) Descriptor deprecated

func (*UpdateI) Descriptor() ([]byte, []int)

Deprecated: Use UpdateI.ProtoReflect.Descriptor instead.

func (*UpdateI) GetFilter

func (x *UpdateI) GetFilter() *UpdateI_Filter

func (*UpdateI) GetObject

func (x *UpdateI) GetObject() []*UpdateI_Object

func (*UpdateI) ProtoMessage

func (*UpdateI) ProtoMessage()

func (*UpdateI) ProtoReflect

func (x *UpdateI) ProtoReflect() protoreflect.Message

func (*UpdateI) Reset

func (x *UpdateI) Reset()

func (*UpdateI) String

func (x *UpdateI) String() string

type UpdateI_Filter

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

func (*UpdateI_Filter) Descriptor deprecated

func (*UpdateI_Filter) Descriptor() ([]byte, []int)

Deprecated: Use UpdateI_Filter.ProtoReflect.Descriptor instead.

func (*UpdateI_Filter) ProtoMessage

func (*UpdateI_Filter) ProtoMessage()

func (*UpdateI_Filter) ProtoReflect

func (x *UpdateI_Filter) ProtoReflect() protoreflect.Message

func (*UpdateI_Filter) Reset

func (x *UpdateI_Filter) Reset()

func (*UpdateI_Filter) String

func (x *UpdateI_Filter) String() string

type UpdateI_Object

type UpdateI_Object struct {
	Intern *UpdateI_Object_Intern `protobuf:"bytes,100,opt,name=intern,proto3" json:"intern,omitempty"`
	Public *UpdateI_Object_Public `protobuf:"bytes,200,opt,name=public,proto3" json:"public,omitempty"`
	Symbol *UpdateI_Object_Symbol `protobuf:"bytes,300,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateI_Object) Descriptor deprecated

func (*UpdateI_Object) Descriptor() ([]byte, []int)

Deprecated: Use UpdateI_Object.ProtoReflect.Descriptor instead.

func (*UpdateI_Object) GetIntern

func (x *UpdateI_Object) GetIntern() *UpdateI_Object_Intern

func (*UpdateI_Object) GetPublic

func (x *UpdateI_Object) GetPublic() *UpdateI_Object_Public

func (*UpdateI_Object) GetSymbol

func (x *UpdateI_Object) GetSymbol() *UpdateI_Object_Symbol

func (*UpdateI_Object) ProtoMessage

func (*UpdateI_Object) ProtoMessage()

func (*UpdateI_Object) ProtoReflect

func (x *UpdateI_Object) ProtoReflect() protoreflect.Message

func (*UpdateI_Object) Reset

func (x *UpdateI_Object) Reset()

func (*UpdateI_Object) String

func (x *UpdateI_Object) String() string

type UpdateI_Object_Intern

type UpdateI_Object_Intern struct {

	// id is the ID of the user being updated.
	Id string `protobuf:"bytes,100,opt,name=id,proto3" json:"id,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateI_Object_Intern) Descriptor deprecated

func (*UpdateI_Object_Intern) Descriptor() ([]byte, []int)

Deprecated: Use UpdateI_Object_Intern.ProtoReflect.Descriptor instead.

func (*UpdateI_Object_Intern) GetId

func (x *UpdateI_Object_Intern) GetId() string

func (*UpdateI_Object_Intern) ProtoMessage

func (*UpdateI_Object_Intern) ProtoMessage()

func (*UpdateI_Object_Intern) ProtoReflect

func (x *UpdateI_Object_Intern) ProtoReflect() protoreflect.Message

func (*UpdateI_Object_Intern) Reset

func (x *UpdateI_Object_Intern) Reset()

func (*UpdateI_Object_Intern) String

func (x *UpdateI_Object_Intern) String() string

type UpdateI_Object_Public

type UpdateI_Object_Public struct {

	// image is the URL pointing to the user's profile picture.
	Image string `protobuf:"bytes,100,opt,name=image,proto3" json:"image,omitempty"`
	// name is the user name.
	Name string `protobuf:"bytes,200,opt,name=name,proto3" json:"name,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateI_Object_Public) Descriptor deprecated

func (*UpdateI_Object_Public) Descriptor() ([]byte, []int)

Deprecated: Use UpdateI_Object_Public.ProtoReflect.Descriptor instead.

func (*UpdateI_Object_Public) GetImage added in v0.1.12

func (x *UpdateI_Object_Public) GetImage() string

func (*UpdateI_Object_Public) GetName added in v0.1.12

func (x *UpdateI_Object_Public) GetName() string

func (*UpdateI_Object_Public) ProtoMessage

func (*UpdateI_Object_Public) ProtoMessage()

func (*UpdateI_Object_Public) ProtoReflect

func (x *UpdateI_Object_Public) ProtoReflect() protoreflect.Message

func (*UpdateI_Object_Public) Reset

func (x *UpdateI_Object_Public) Reset()

func (*UpdateI_Object_Public) String

func (x *UpdateI_Object_Public) String() string

type UpdateI_Object_Symbol

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

func (*UpdateI_Object_Symbol) Descriptor deprecated

func (*UpdateI_Object_Symbol) Descriptor() ([]byte, []int)

Deprecated: Use UpdateI_Object_Symbol.ProtoReflect.Descriptor instead.

func (*UpdateI_Object_Symbol) ProtoMessage

func (*UpdateI_Object_Symbol) ProtoMessage()

func (*UpdateI_Object_Symbol) ProtoReflect

func (x *UpdateI_Object_Symbol) ProtoReflect() protoreflect.Message

func (*UpdateI_Object_Symbol) Reset

func (x *UpdateI_Object_Symbol) Reset()

func (*UpdateI_Object_Symbol) String

func (x *UpdateI_Object_Symbol) String() string

type UpdateO

type UpdateO struct {
	Filter *UpdateO_Filter   `protobuf:"bytes,100,opt,name=filter,proto3" json:"filter,omitempty"`
	Object []*UpdateO_Object `protobuf:"bytes,200,rep,name=object,proto3" json:"object,omitempty"`
	// contains filtered or unexported fields
}

UpdateO is the output for updating users.

{
    "object": [
        {
            "intern": {
                "status": "updated"
            }
        }
    ]
}

func (*UpdateO) Descriptor deprecated

func (*UpdateO) Descriptor() ([]byte, []int)

Deprecated: Use UpdateO.ProtoReflect.Descriptor instead.

func (*UpdateO) GetFilter

func (x *UpdateO) GetFilter() *UpdateO_Filter

func (*UpdateO) GetObject

func (x *UpdateO) GetObject() []*UpdateO_Object

func (*UpdateO) ProtoMessage

func (*UpdateO) ProtoMessage()

func (*UpdateO) ProtoReflect

func (x *UpdateO) ProtoReflect() protoreflect.Message

func (*UpdateO) Reset

func (x *UpdateO) Reset()

func (*UpdateO) String

func (x *UpdateO) String() string

type UpdateO_Filter

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

func (*UpdateO_Filter) Descriptor deprecated

func (*UpdateO_Filter) Descriptor() ([]byte, []int)

Deprecated: Use UpdateO_Filter.ProtoReflect.Descriptor instead.

func (*UpdateO_Filter) ProtoMessage

func (*UpdateO_Filter) ProtoMessage()

func (*UpdateO_Filter) ProtoReflect

func (x *UpdateO_Filter) ProtoReflect() protoreflect.Message

func (*UpdateO_Filter) Reset

func (x *UpdateO_Filter) Reset()

func (*UpdateO_Filter) String

func (x *UpdateO_Filter) String() string

type UpdateO_Object

type UpdateO_Object struct {
	Intern *UpdateO_Object_Intern `protobuf:"bytes,100,opt,name=intern,proto3" json:"intern,omitempty"`
	Public *UpdateO_Object_Public `protobuf:"bytes,200,opt,name=public,proto3" json:"public,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateO_Object) Descriptor deprecated

func (*UpdateO_Object) Descriptor() ([]byte, []int)

Deprecated: Use UpdateO_Object.ProtoReflect.Descriptor instead.

func (*UpdateO_Object) GetIntern

func (x *UpdateO_Object) GetIntern() *UpdateO_Object_Intern

func (*UpdateO_Object) GetPublic

func (x *UpdateO_Object) GetPublic() *UpdateO_Object_Public

func (*UpdateO_Object) ProtoMessage

func (*UpdateO_Object) ProtoMessage()

func (*UpdateO_Object) ProtoReflect

func (x *UpdateO_Object) ProtoReflect() protoreflect.Message

func (*UpdateO_Object) Reset

func (x *UpdateO_Object) Reset()

func (*UpdateO_Object) String

func (x *UpdateO_Object) String() string

type UpdateO_Object_Intern

type UpdateO_Object_Intern struct {

	// status is the resource status upon successful user modification.
	Status string `protobuf:"bytes,100,opt,name=status,proto3" json:"status,omitempty"`
	// contains filtered or unexported fields
}

func (*UpdateO_Object_Intern) Descriptor deprecated

func (*UpdateO_Object_Intern) Descriptor() ([]byte, []int)

Deprecated: Use UpdateO_Object_Intern.ProtoReflect.Descriptor instead.

func (*UpdateO_Object_Intern) GetStatus

func (x *UpdateO_Object_Intern) GetStatus() string

func (*UpdateO_Object_Intern) ProtoMessage

func (*UpdateO_Object_Intern) ProtoMessage()

func (*UpdateO_Object_Intern) ProtoReflect

func (x *UpdateO_Object_Intern) ProtoReflect() protoreflect.Message

func (*UpdateO_Object_Intern) Reset

func (x *UpdateO_Object_Intern) Reset()

func (*UpdateO_Object_Intern) String

func (x *UpdateO_Object_Intern) String() string

type UpdateO_Object_Public

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

func (*UpdateO_Object_Public) Descriptor deprecated

func (*UpdateO_Object_Public) Descriptor() ([]byte, []int)

Deprecated: Use UpdateO_Object_Public.ProtoReflect.Descriptor instead.

func (*UpdateO_Object_Public) ProtoMessage

func (*UpdateO_Object_Public) ProtoMessage()

func (*UpdateO_Object_Public) ProtoReflect

func (x *UpdateO_Object_Public) ProtoReflect() protoreflect.Message

func (*UpdateO_Object_Public) Reset

func (x *UpdateO_Object_Public) Reset()

func (*UpdateO_Object_Public) String

func (x *UpdateO_Object_Public) String() string

Jump to

Keyboard shortcuts

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