Documentation
¶
Index ¶
- Variables
- type Consent
- type CreateCmd
- type FakeConsentBuilder
- type MockService
- func (_m *MockService) Check(r *http.Request, client *oauthclients.Client, session *websessions.Session) error
- func (_m *MockService) Create(ctx context.Context, cmd *CreateCmd) (*Consent, error)
- func (_m *MockService) Delete(ctx context.Context, consentID uuid.UUID) error
- func (_m *MockService) DeleteAll(ctx context.Context, userID uuid.UUID) error
- func (_m *MockService) GetAll(ctx context.Context, userID uuid.UUID, cmd *sqlstorage.PaginateCmd) ([]Consent, error)
- type OauthConsentsService
- func (s *OauthConsentsService) Check(r *http.Request, client *oauthclients.Client, session *websessions.Session) error
- func (s *OauthConsentsService) Create(ctx context.Context, cmd *CreateCmd) (*Consent, error)
- func (s *OauthConsentsService) Delete(ctx context.Context, consentID uuid.UUID) error
- func (s *OauthConsentsService) DeleteAll(ctx context.Context, userID uuid.UUID) error
- func (s *OauthConsentsService) GetAll(ctx context.Context, userID uuid.UUID, cmd *sqlstorage.PaginateCmd) ([]Consent, error)
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrConsentNotFound = errors.New("consent not found")
View Source
var ExampleAliceConsent = Consent{ // contains filtered or unexported fields }
Functions ¶
This section is empty.
Types ¶
type Consent ¶
type Consent struct {
// contains filtered or unexported fields
}
func (*Consent) SessionToken ¶
type FakeConsentBuilder ¶
type FakeConsentBuilder struct {
// contains filtered or unexported fields
}
func NewFakeConsent ¶
func NewFakeConsent(t testing.TB) *FakeConsentBuilder
func (*FakeConsentBuilder) Build ¶
func (f *FakeConsentBuilder) Build() *Consent
func (*FakeConsentBuilder) CreatedBy ¶
func (f *FakeConsentBuilder) CreatedBy(user *users.User) *FakeConsentBuilder
func (*FakeConsentBuilder) WithClient ¶
func (f *FakeConsentBuilder) WithClient(client *oauthclients.Client) *FakeConsentBuilder
type MockService ¶
MockService is an autogenerated mock type for the Service type
func NewMockService ¶
func NewMockService(t interface { mock.TestingT Cleanup(func()) }) *MockService
NewMockService creates a new instance of MockService. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations. The first argument is typically a *testing.T value.
func (*MockService) Check ¶
func (_m *MockService) Check(r *http.Request, client *oauthclients.Client, session *websessions.Session) error
Check provides a mock function with given fields: r, client, session
func (*MockService) GetAll ¶
func (_m *MockService) GetAll(ctx context.Context, userID uuid.UUID, cmd *sqlstorage.PaginateCmd) ([]Consent, error)
GetAll provides a mock function with given fields: ctx, userID, cmd
type OauthConsentsService ¶
type OauthConsentsService struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(storage storage, tools tools.Tools) *OauthConsentsService
func (*OauthConsentsService) Check ¶
func (s *OauthConsentsService) Check(r *http.Request, client *oauthclients.Client, session *websessions.Session) error
func (*OauthConsentsService) GetAll ¶
func (s *OauthConsentsService) GetAll(ctx context.Context, userID uuid.UUID, cmd *sqlstorage.PaginateCmd) ([]Consent, error)
type Service ¶
type Service interface { Create(ctx context.Context, cmd *CreateCmd) (*Consent, error) Check(r *http.Request, client *oauthclients.Client, session *websessions.Session) error Delete(ctx context.Context, consentID uuid.UUID) error GetAll(ctx context.Context, userID uuid.UUID, cmd *sqlstorage.PaginateCmd) ([]Consent, error) DeleteAll(ctx context.Context, userID uuid.UUID) error }
Click to show internal directories.
Click to hide internal directories.