userAction

package
v0.0.0-...-4834045 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package userAction ユーザーアクション

Package userAction ユーザーアクション

Package userAction is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockUserActionMysqlRepository

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

MockUserActionMysqlRepository is a mock of UserActionMysqlRepository interface.

func NewMockUserActionMysqlRepository

func NewMockUserActionMysqlRepository(ctrl *gomock.Controller) *MockUserActionMysqlRepository

NewMockUserActionMysqlRepository creates a new mock instance.

func (*MockUserActionMysqlRepository) Create

Create mocks base method.

func (*MockUserActionMysqlRepository) CreateList

CreateList mocks base method.

func (*MockUserActionMysqlRepository) Delete

Delete mocks base method.

func (*MockUserActionMysqlRepository) DeleteList

DeleteList mocks base method.

func (*MockUserActionMysqlRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockUserActionMysqlRepository) Find

func (m *MockUserActionMysqlRepository) Find(ctx context.Context, userId string, masterActionId int64) (*UserAction, error)

Find mocks base method.

func (*MockUserActionMysqlRepository) FindList

FindList mocks base method.

func (*MockUserActionMysqlRepository) FindOrNil

func (m *MockUserActionMysqlRepository) FindOrNil(ctx context.Context, userId string, masterActionId int64) (*UserAction, error)

FindOrNil mocks base method.

func (*MockUserActionMysqlRepository) Update

Update mocks base method.

func (*MockUserActionMysqlRepository) UpdateList

UpdateList mocks base method.

type MockUserActionMysqlRepositoryMockRecorder

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

MockUserActionMysqlRepositoryMockRecorder is the mock recorder for MockUserActionMysqlRepository.

func (*MockUserActionMysqlRepositoryMockRecorder) Create

func (mr *MockUserActionMysqlRepositoryMockRecorder) Create(ctx, tx, m interface{}) *gomock.Call

Create indicates an expected call of Create.

func (*MockUserActionMysqlRepositoryMockRecorder) CreateList

func (mr *MockUserActionMysqlRepositoryMockRecorder) CreateList(ctx, tx, ms interface{}) *gomock.Call

CreateList indicates an expected call of CreateList.

func (*MockUserActionMysqlRepositoryMockRecorder) Delete

func (mr *MockUserActionMysqlRepositoryMockRecorder) Delete(ctx, tx, m interface{}) *gomock.Call

Delete indicates an expected call of Delete.

func (*MockUserActionMysqlRepositoryMockRecorder) DeleteList

func (mr *MockUserActionMysqlRepositoryMockRecorder) DeleteList(ctx, tx, ms interface{}) *gomock.Call

DeleteList indicates an expected call of DeleteList.

func (*MockUserActionMysqlRepositoryMockRecorder) Find

func (mr *MockUserActionMysqlRepositoryMockRecorder) Find(ctx, userId, masterActionId interface{}) *gomock.Call

Find indicates an expected call of Find.

func (*MockUserActionMysqlRepositoryMockRecorder) FindList

func (mr *MockUserActionMysqlRepositoryMockRecorder) FindList(ctx, userId interface{}) *gomock.Call

FindList indicates an expected call of FindList.

func (*MockUserActionMysqlRepositoryMockRecorder) FindOrNil

func (mr *MockUserActionMysqlRepositoryMockRecorder) FindOrNil(ctx, userId, masterActionId interface{}) *gomock.Call

FindOrNil indicates an expected call of FindOrNil.

func (*MockUserActionMysqlRepositoryMockRecorder) Update

func (mr *MockUserActionMysqlRepositoryMockRecorder) Update(ctx, tx, m interface{}) *gomock.Call

Update indicates an expected call of Update.

func (*MockUserActionMysqlRepositoryMockRecorder) UpdateList

func (mr *MockUserActionMysqlRepositoryMockRecorder) UpdateList(ctx, tx, ms interface{}) *gomock.Call

UpdateList indicates an expected call of UpdateList.

type UserAction

type UserAction struct {
	UserId         string
	MasterActionId int64
	StartedAt      time.Time
}

func NewUserAction

func NewUserAction() *UserAction

func SetUserAction

func SetUserAction(userId string, masterActionId int64, startedAt time.Time) *UserAction

func (*UserAction) CheckExpiration

func (s *UserAction) CheckExpiration(now time.Time, expiration *int32) bool

CheckExpiration 有効期限を確認する

type UserActionMysqlRepository

type UserActionMysqlRepository interface {
	Find(ctx context.Context, userId string, masterActionId int64) (*UserAction, error)
	FindOrNil(ctx context.Context, userId string, masterActionId int64) (*UserAction, error)
	FindList(ctx context.Context, userId string) (UserActions, error)
	Create(ctx context.Context, tx *gorm.DB, m *UserAction) (*UserAction, error)
	CreateList(ctx context.Context, tx *gorm.DB, ms UserActions) (UserActions, error)
	Update(ctx context.Context, tx *gorm.DB, m *UserAction) (*UserAction, error)
	UpdateList(ctx context.Context, tx *gorm.DB, ms UserActions) (UserActions, error)
	Delete(ctx context.Context, tx *gorm.DB, m *UserAction) error
	DeleteList(ctx context.Context, tx *gorm.DB, ms UserActions) error
}

type UserActions

type UserActions []*UserAction

func NewUserActions

func NewUserActions() UserActions

Jump to

Keyboard shortcuts

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