pkg

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

* Licensed to the Apache Software Foundation (ASF) under one or more * contributor license agreements. See the NOTICE file distributed with * this work for additional information regarding copyright ownership. * The ASF licenses this file to You under the Apache License, Version 2.0 * (the "License"); you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License.

Index

Constants

View Source
const (
	MAN = iota
	WOMAN
)

Variables

View Source
var (
	DefaultUser = User{
		ID: "0", Name: "Alex Stocks", Age: 31,
		Birth: int(time.Date(1985, 11, 24, 15, 15, 0, 0, time.Local).Unix()),
		// contains filtered or unexported fields
	}
)

Functions

This section is empty.

Types

type Gender

type Gender int

func (Gender) String

func (g Gender) String() string

type User

type User struct {
	ID   string `json:"id"`
	Name string `json:"name"`
	Age  int    `json:"age"`

	Birth int    `json:"time"`
	Sex   string `json:"sex"`
	// contains filtered or unexported fields
}

type UserProvider

type UserProvider struct {
}

func (*UserProvider) GetUser

func (u *UserProvider) GetUser(ctx context.Context, userID string) (*User, error)

func (*UserProvider) GetUser0

func (u *UserProvider) GetUser0(userID string, name string) (User, error)

func (*UserProvider) GetUser2

func (u *UserProvider) GetUser2(ctx context.Context, userID string) (*User, error)

func (*UserProvider) GetUser3

func (u *UserProvider) GetUser3() error

func (*UserProvider) GetUsers

func (u *UserProvider) GetUsers(req []interface{}) ([]*User, error)

func (*UserProvider) MethodMapper

func (s *UserProvider) MethodMapper() map[string]string

type UserProvider1

type UserProvider1 struct {
}

func (*UserProvider1) GetUser

func (u *UserProvider1) GetUser(ctx context.Context, userID string) (*User, error)

func (*UserProvider1) GetUser0

func (u *UserProvider1) GetUser0(userID string, name string) (User, error)

func (*UserProvider1) GetUser2

func (u *UserProvider1) GetUser2(ctx context.Context, userID string) (*User, error)

func (*UserProvider1) GetUser3

func (u *UserProvider1) GetUser3() error

func (*UserProvider1) GetUsers

func (u *UserProvider1) GetUsers(req []interface{}) ([]*User, error)

func (*UserProvider1) MethodMapper

func (s *UserProvider1) MethodMapper() map[string]string

type UserProvider2

type UserProvider2 struct {
}

func (*UserProvider2) GetUser

func (u *UserProvider2) GetUser(ctx context.Context, userID string) (*User, error)

func (*UserProvider2) GetUser0

func (u *UserProvider2) GetUser0(userID string, name string) (User, error)

func (*UserProvider2) GetUser2

func (u *UserProvider2) GetUser2(ctx context.Context, userID string) (*User, error)

func (*UserProvider2) GetUser3

func (u *UserProvider2) GetUser3() error

func (*UserProvider2) GetUsers

func (u *UserProvider2) GetUsers(req []interface{}) ([]*User, error)

func (*UserProvider2) MethodMapper

func (s *UserProvider2) MethodMapper() map[string]string

Jump to

Keyboard shortcuts

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