testutil

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Provider

type Provider struct {
	Fail                func(string)
	SearchPostsFunc     func(context.Context, string, int) (domain.Page[domain.Post], error)
	GetPostFunc         func(context.Context, string) (domain.Post, error)
	GetPostRepliesFunc  func(context.Context, string, int) (domain.Page[domain.Reply], error)
	GetProfileFunc      func(context.Context, string) (domain.Profile, error)
	GetProfilePostsFunc func(context.Context, string, int) (domain.Page[domain.Post], error)
	InfoValue           provider.Info
}

func (*Provider) GetPost

func (p *Provider) GetPost(ctx context.Context, post string) (domain.Post, error)

func (*Provider) GetPostReplies

func (p *Provider) GetPostReplies(ctx context.Context, post string, limit int) (domain.Page[domain.Reply], error)

func (*Provider) GetProfile

func (p *Provider) GetProfile(ctx context.Context, username string) (domain.Profile, error)

func (*Provider) GetProfilePosts

func (p *Provider) GetProfilePosts(ctx context.Context, username string, limit int) (domain.Page[domain.Post], error)

func (*Provider) Info

func (p *Provider) Info() provider.Info

func (*Provider) SearchPosts

func (p *Provider) SearchPosts(ctx context.Context, query string, limit int) (domain.Page[domain.Post], error)

Jump to

Keyboard shortcuts

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