commit

package
v1.1.0-beta Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitCommitService

func InitCommitService[T any](name string)

func InitCommitWithKeyService

func InitCommitWithKeyService[T any](name string, key string)

Types

type Commit

type Commit[H any] struct {
	UUID     string
	Target   string
	Key      string
	Data     *H
	CreateAt time.Time
	Operator string
}

type ICommitService

type ICommitService[T any] interface {
	Latest(ctx context.Context, target string, key string) (*Commit[T], error)
	ListLatest(ctx context.Context, target ...string) ([]*Commit[T], error)
	Save(ctx context.Context, target string, key string, data *T) error
	Get(ctx context.Context, uuid string) (*Commit[T], error)
	List(ctx context.Context, uuids ...string) ([]*Commit[T], error)
}

type ICommitWithKeyService

type ICommitWithKeyService[T any] interface {
	Latest(ctx context.Context, target string) (*Commit[T], error)
	ListLatest(ctx context.Context, target ...string) ([]*Commit[T], error)
	Save(ctx context.Context, target string, data *T) error
	Get(ctx context.Context, uuid string) (*Commit[T], error)
	List(ctx context.Context, uuids ...string) ([]*Commit[T], error)
}

Jump to

Keyboard shortcuts

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