Documentation ¶
Index ¶
- Variables
- func CreatePublication(ctx context.Context, tx pgx.Tx, id string, audience string) error
- func CreatePublicationAcknowledgement(ctx context.Context, tx pgx.Tx, pubID, versionID string, t time.Time, ...) error
- func CreatePublicationVersion(ctx context.Context, tx pgx.Tx, data PublicationVersion) (id string, err error)
- func DeletePublication(ctx context.Context, tx pgx.Tx, id string, idempotent bool) error
- func GetLatestVersionID(ctx context.Context, tx pgx.Tx, pubID string) (version string, err error)
- func GetPublication(ctx context.Context, tx pgx.Tx, pubID, versionID string) (*traits.Publication, error)
- func GetPublicationIDForVersion(ctx context.Context, tx pgx.Tx, versionID string) (pubID string, err error)
- func GetPublicationsPaginated(ctx context.Context, tx pgx.Tx, token string, limit int) (publications []*traits.Publication, nextToken string, err error)
- func SetupDB(ctx context.Context, pool *pgxpool.Pool) error
- type Acknowledgement
- type Option
- type PublicationVersion
- type Server
- func (p *Server) AcknowledgePublication(ctx context.Context, request *traits.AcknowledgePublicationRequest) (*traits.Publication, error)
- func (p *Server) CreatePublication(ctx context.Context, request *traits.CreatePublicationRequest) (*traits.Publication, error)
- func (p *Server) DeletePublication(ctx context.Context, request *traits.DeletePublicationRequest) (*traits.Publication, error)
- func (p *Server) GetPublication(ctx context.Context, request *traits.GetPublicationRequest) (*traits.Publication, error)
- func (p *Server) ListPublications(ctx context.Context, request *traits.ListPublicationsRequest) (*traits.ListPublicationsResponse, error)
- func (p *Server) PullPublication(_ *traits.PullPublicationRequest, ...) error
- func (p *Server) PullPublications(_ *traits.PullPublicationsRequest, ...) error
- func (p *Server) UpdatePublication(ctx context.Context, request *traits.UpdatePublicationRequest) (*traits.Publication, error)
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrExpectedVersion = status.Error(codes.FailedPrecondition, "expected latest version does not match")
Functions ¶
func CreatePublication ¶
func CreatePublicationVersion ¶
func CreatePublicationVersion(ctx context.Context, tx pgx.Tx, data PublicationVersion) (id string, err error)
func DeletePublication ¶
func GetLatestVersionID ¶
func GetPublication ¶
Types ¶
type Acknowledgement ¶
func GetAcknowledgement ¶
func GetAcknowledgement(ctx context.Context, tx pgx.Tx, versionID string) (*Acknowledgement, error)
GetAcknowledgement retrieves the acknowledgement state of a particular publication version. If the version has not been acknowledged, returns a nil Acknowledgement.
type PublicationVersion ¶
type Server ¶
type Server struct { traits.UnimplementedPublicationApiServer // contains filtered or unexported fields }
func NewServerFromPool ¶
func (*Server) AcknowledgePublication ¶
func (p *Server) AcknowledgePublication(ctx context.Context, request *traits.AcknowledgePublicationRequest) (*traits.Publication, error)
func (*Server) CreatePublication ¶
func (p *Server) CreatePublication(ctx context.Context, request *traits.CreatePublicationRequest) (*traits.Publication, error)
func (*Server) DeletePublication ¶
func (p *Server) DeletePublication(ctx context.Context, request *traits.DeletePublicationRequest) (*traits.Publication, error)
func (*Server) GetPublication ¶
func (p *Server) GetPublication(ctx context.Context, request *traits.GetPublicationRequest) (*traits.Publication, error)
func (*Server) ListPublications ¶
func (p *Server) ListPublications(ctx context.Context, request *traits.ListPublicationsRequest) (*traits.ListPublicationsResponse, error)
func (*Server) PullPublication ¶
func (p *Server) PullPublication(_ *traits.PullPublicationRequest, _ traits.PublicationApi_PullPublicationServer) error
func (*Server) PullPublications ¶
func (p *Server) PullPublications(_ *traits.PullPublicationsRequest, _ traits.PublicationApi_PullPublicationsServer) error
func (*Server) UpdatePublication ¶
func (p *Server) UpdatePublication(ctx context.Context, request *traits.UpdatePublicationRequest) (*traits.Publication, error)
Click to show internal directories.
Click to hide internal directories.