├── .github └── workflows │ └── deploy.yml ├── .gitignore ├── Dockerfile ├── LICENSE ├── README.md ├── active.en.toml ├── active.sv.toml ├── cmd └── base │ └── main.go ├── config └── main.go ├── database.go ├── dist ├── assets │ ├── css │ │ └── main.css │ ├── images │ │ ├── android-chrome-192x192.png │ │ ├── android-chrome-512x512.png │ │ ├── apple-touch-icon.png │ │ ├── favicon-16x16.png │ │ ├── favicon-32x32.png │ │ ├── favicon.ico │ │ └── site.webmanifest │ └── js │ │ └── main.js └── templates │ ├── 404.html │ ├── activate.html │ ├── admin.html │ ├── chart.html │ ├── footer.html │ ├── forgotpassword.html │ ├── head.html │ ├── header.html │ ├── index.html │ ├── login.html │ ├── messages.html │ ├── register.html │ ├── resendactivation.html │ ├── resetpassword.html │ ├── search.html │ └── tracking.html ├── docker-compose.yml ├── email └── main.go ├── env.go ├── go.mod ├── go.sum ├── lang ├── main.go └── messages.go ├── main.go ├── middleware ├── auth.go ├── cache.go ├── general.go ├── noauth.go ├── sensitive.go ├── session.go └── throttle.go ├── models ├── session.go ├── token.go ├── user.go └── website.go ├── package-lock.json ├── package.json ├── routes ├── activate.go ├── admin.go ├── forgotpassword.go ├── index.go ├── login.go ├── logout.go ├── main.go ├── noroute.go ├── register.go ├── resendactivation.go ├── resetpassword.go └── search.go ├── src ├── custom.scss ├── index.js └── style.scss ├── staticcheck.conf ├── templates.go ├── text ├── html.go ├── random.go └── segment.go ├── ulid └── generate.go ├── vendor ├── github.com │ ├── BurntSushi │ │ └── toml │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── COMPATIBLE │ │ │ ├── COPYING │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── decode.go │ │ │ ├── decode_meta.go │ │ │ ├── doc.go │ │ │ ├── encode.go │ │ │ ├── encoding_types.go │ │ │ ├── encoding_types_1.1.go │ │ │ ├── lex.go │ │ │ ├── parse.go │ │ │ ├── session.vim │ │ │ ├── type_check.go │ │ │ └── type_fields.go │ ├── gin-contrib │ │ ├── sessions │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── cookie │ │ │ │ └── cookie.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── session_options_go1.10.go │ │ │ ├── session_options_go1.11.go │ │ │ └── sessions.go │ │ └── sse │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── sse-decoder.go │ │ │ ├── sse-encoder.go │ │ │ └── writer.go │ ├── gin-gonic │ │ └── gin │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── AUTHORS.md │ │ │ ├── BENCHMARKS.md │ │ │ ├── CHANGELOG.md │ │ │ ├── CODE_OF_CONDUCT.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── auth.go │ │ │ ├── binding │ │ │ ├── binding.go │ │ │ ├── binding_nomsgpack.go │ │ │ ├── default_validator.go │ │ │ ├── form.go │ │ │ ├── form_mapping.go │ │ │ ├── header.go │ │ │ ├── json.go │ │ │ ├── msgpack.go │ │ │ ├── multipart_form_mapping.go │ │ │ ├── protobuf.go │ │ │ ├── query.go │ │ │ ├── uri.go │ │ │ ├── xml.go │ │ │ └── yaml.go │ │ │ ├── codecov.yml │ │ │ ├── context.go │ │ │ ├── context_appengine.go │ │ │ ├── debug.go │ │ │ ├── deprecated.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ ├── fs.go │ │ │ ├── gin.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── internal │ │ │ ├── bytesconv │ │ │ │ └── bytesconv.go │ │ │ └── json │ │ │ │ ├── json.go │ │ │ │ └── jsoniter.go │ │ │ ├── logger.go │ │ │ ├── mode.go │ │ │ ├── path.go │ │ │ ├── recovery.go │ │ │ ├── render │ │ │ ├── data.go │ │ │ ├── html.go │ │ │ ├── json.go │ │ │ ├── msgpack.go │ │ │ ├── protobuf.go │ │ │ ├── reader.go │ │ │ ├── redirect.go │ │ │ ├── render.go │ │ │ ├── text.go │ │ │ ├── xml.go │ │ │ └── yaml.go │ │ │ ├── response_writer.go │ │ │ ├── routergroup.go │ │ │ ├── test_helpers.go │ │ │ ├── tree.go │ │ │ ├── utils.go │ │ │ └── version.go │ ├── go-playground │ │ ├── locales │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── currency │ │ │ │ └── currency.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── logo.png │ │ │ └── rules.go │ │ ├── universal-translator │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── errors.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── import_export.go │ │ │ ├── logo.png │ │ │ ├── translator.go │ │ │ └── universal_translator.go │ │ └── validator │ │ │ └── v10 │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── baked_in.go │ │ │ ├── cache.go │ │ │ ├── country_codes.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ ├── field_level.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── logo.png │ │ │ ├── regexes.go │ │ │ ├── struct_level.go │ │ │ ├── translations.go │ │ │ ├── util.go │ │ │ ├── validator.go │ │ │ └── validator_instance.go │ ├── go-sql-driver │ │ └── mysql │ │ │ ├── .gitignore │ │ │ ├── AUTHORS │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── auth.go │ │ │ ├── buffer.go │ │ │ ├── collations.go │ │ │ ├── conncheck.go │ │ │ ├── conncheck_dummy.go │ │ │ ├── connection.go │ │ │ ├── connector.go │ │ │ ├── const.go │ │ │ ├── driver.go │ │ │ ├── dsn.go │ │ │ ├── errors.go │ │ │ ├── fields.go │ │ │ ├── fuzz.go │ │ │ ├── go.mod │ │ │ ├── infile.go │ │ │ ├── nulltime.go │ │ │ ├── nulltime_go113.go │ │ │ ├── nulltime_legacy.go │ │ │ ├── packets.go │ │ │ ├── result.go │ │ │ ├── rows.go │ │ │ ├── statement.go │ │ │ ├── transaction.go │ │ │ └── utils.go │ ├── golang │ │ └── protobuf │ │ │ ├── AUTHORS │ │ │ ├── CONTRIBUTORS │ │ │ ├── LICENSE │ │ │ └── proto │ │ │ ├── buffer.go │ │ │ ├── defaults.go │ │ │ ├── deprecated.go │ │ │ ├── discard.go │ │ │ ├── extensions.go │ │ │ ├── properties.go │ │ │ ├── proto.go │ │ │ ├── registry.go │ │ │ ├── text_decode.go │ │ │ ├── text_encode.go │ │ │ ├── wire.go │ │ │ └── wrappers.go │ ├── gorilla │ │ ├── context │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── context.go │ │ │ └── doc.go │ │ ├── securecookie │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── fuzz.go │ │ │ └── securecookie.go │ │ └── sessions │ │ │ ├── AUTHORS │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── cookie.go │ │ │ ├── cookie_go111.go │ │ │ ├── doc.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── lex.go │ │ │ ├── options.go │ │ │ ├── options_go111.go │ │ │ ├── sessions.go │ │ │ └── store.go │ ├── jackc │ │ ├── chunkreader │ │ │ └── v2 │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── chunkreader.go │ │ │ │ └── go.mod │ │ ├── pgconn │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── auth_scram.go │ │ │ ├── config.go │ │ │ ├── defaults.go │ │ │ ├── defaults_windows.go │ │ │ ├── doc.go │ │ │ ├── errors.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── internal │ │ │ │ └── ctxwatch │ │ │ │ │ └── context_watcher.go │ │ │ ├── pgconn.go │ │ │ └── stmtcache │ │ │ │ ├── lru.go │ │ │ │ └── stmtcache.go │ │ ├── pgio │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── go.mod │ │ │ └── write.go │ │ ├── pgpassfile │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ └── pgpass.go │ │ ├── pgproto3 │ │ │ └── v2 │ │ │ │ ├── .travis.yml │ │ │ │ ├── LICENSE │ │ │ │ ├── README.md │ │ │ │ ├── authentication_cleartext_password.go │ │ │ │ ├── authentication_md5_password.go │ │ │ │ ├── authentication_ok.go │ │ │ │ ├── authentication_sasl.go │ │ │ │ ├── authentication_sasl_continue.go │ │ │ │ ├── authentication_sasl_final.go │ │ │ │ ├── backend.go │ │ │ │ ├── backend_key_data.go │ │ │ │ ├── big_endian.go │ │ │ │ ├── bind.go │ │ │ │ ├── bind_complete.go │ │ │ │ ├── cancel_request.go │ │ │ │ ├── chunkreader.go │ │ │ │ ├── close.go │ │ │ │ ├── close_complete.go │ │ │ │ ├── command_complete.go │ │ │ │ ├── copy_both_response.go │ │ │ │ ├── copy_data.go │ │ │ │ ├── copy_done.go │ │ │ │ ├── copy_fail.go │ │ │ │ ├── copy_in_response.go │ │ │ │ ├── copy_out_response.go │ │ │ │ ├── data_row.go │ │ │ │ ├── describe.go │ │ │ │ ├── doc.go │ │ │ │ ├── empty_query_response.go │ │ │ │ ├── error_response.go │ │ │ │ ├── execute.go │ │ │ │ ├── flush.go │ │ │ │ ├── frontend.go │ │ │ │ ├── function_call.go │ │ │ │ ├── function_call_response.go │ │ │ │ ├── go.mod │ │ │ │ ├── go.sum │ │ │ │ ├── gss_enc_request.go │ │ │ │ ├── no_data.go │ │ │ │ ├── notice_response.go │ │ │ │ ├── notification_response.go │ │ │ │ ├── parameter_description.go │ │ │ │ ├── parameter_status.go │ │ │ │ ├── parse.go │ │ │ │ ├── parse_complete.go │ │ │ │ ├── password_message.go │ │ │ │ ├── pgproto3.go │ │ │ │ ├── portal_suspended.go │ │ │ │ ├── query.go │ │ │ │ ├── ready_for_query.go │ │ │ │ ├── row_description.go │ │ │ │ ├── sasl_initial_response.go │ │ │ │ ├── sasl_response.go │ │ │ │ ├── ssl_request.go │ │ │ │ ├── startup_message.go │ │ │ │ ├── sync.go │ │ │ │ └── terminate.go │ │ ├── pgservicefile │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ └── pgservicefile.go │ │ ├── pgtype │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── aclitem.go │ │ │ ├── aclitem_array.go │ │ │ ├── array.go │ │ │ ├── array_type.go │ │ │ ├── bit.go │ │ │ ├── bool.go │ │ │ ├── bool_array.go │ │ │ ├── box.go │ │ │ ├── bpchar.go │ │ │ ├── bpchar_array.go │ │ │ ├── bytea.go │ │ │ ├── bytea_array.go │ │ │ ├── cid.go │ │ │ ├── cidr.go │ │ │ ├── cidr_array.go │ │ │ ├── circle.go │ │ │ ├── composite_fields.go │ │ │ ├── composite_type.go │ │ │ ├── convert.go │ │ │ ├── database_sql.go │ │ │ ├── date.go │ │ │ ├── date_array.go │ │ │ ├── daterange.go │ │ │ ├── enum_array.go │ │ │ ├── enum_type.go │ │ │ ├── float4.go │ │ │ ├── float4_array.go │ │ │ ├── float8.go │ │ │ ├── float8_array.go │ │ │ ├── generic_binary.go │ │ │ ├── generic_text.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── hstore.go │ │ │ ├── hstore_array.go │ │ │ ├── inet.go │ │ │ ├── inet_array.go │ │ │ ├── int2.go │ │ │ ├── int2_array.go │ │ │ ├── int4.go │ │ │ ├── int4_array.go │ │ │ ├── int4range.go │ │ │ ├── int8.go │ │ │ ├── int8_array.go │ │ │ ├── int8range.go │ │ │ ├── interval.go │ │ │ ├── json.go │ │ │ ├── jsonb.go │ │ │ ├── jsonb_array.go │ │ │ ├── line.go │ │ │ ├── lseg.go │ │ │ ├── macaddr.go │ │ │ ├── macaddr_array.go │ │ │ ├── name.go │ │ │ ├── numeric.go │ │ │ ├── numeric_array.go │ │ │ ├── numrange.go │ │ │ ├── oid.go │ │ │ ├── oid_value.go │ │ │ ├── path.go │ │ │ ├── pgtype.go │ │ │ ├── pguint32.go │ │ │ ├── point.go │ │ │ ├── polygon.go │ │ │ ├── qchar.go │ │ │ ├── range.go │ │ │ ├── record.go │ │ │ ├── text.go │ │ │ ├── text_array.go │ │ │ ├── tid.go │ │ │ ├── time.go │ │ │ ├── timestamp.go │ │ │ ├── timestamp_array.go │ │ │ ├── timestamptz.go │ │ │ ├── timestamptz_array.go │ │ │ ├── tsrange.go │ │ │ ├── tsrange_array.go │ │ │ ├── tstzrange.go │ │ │ ├── tstzrange_array.go │ │ │ ├── typed_array.go.erb │ │ │ ├── typed_array_gen.sh │ │ │ ├── typed_range.go.erb │ │ │ ├── typed_range_gen.sh │ │ │ ├── unknown.go │ │ │ ├── uuid.go │ │ │ ├── uuid_array.go │ │ │ ├── varbit.go │ │ │ ├── varchar.go │ │ │ ├── varchar_array.go │ │ │ └── xid.go │ │ └── pgx │ │ │ └── v4 │ │ │ ├── .gitignore │ │ │ ├── CHANGELOG.md │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── batch.go │ │ │ ├── conn.go │ │ │ ├── copy_from.go │ │ │ ├── doc.go │ │ │ ├── extended_query_builder.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── go_stdlib.go │ │ │ ├── internal │ │ │ └── sanitize │ │ │ │ └── sanitize.go │ │ │ ├── large_objects.go │ │ │ ├── logger.go │ │ │ ├── messages.go │ │ │ ├── rows.go │ │ │ ├── stdlib │ │ │ └── sql.go │ │ │ ├── tx.go │ │ │ └── values.go │ ├── jinzhu │ │ ├── inflection │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── inflections.go │ │ │ └── wercker.yml │ │ └── now │ │ │ ├── Guardfile │ │ │ ├── License │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── main.go │ │ │ ├── now.go │ │ │ └── time.go │ ├── json-iterator │ │ └── go │ │ │ ├── .codecov.yml │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── Gopkg.lock │ │ │ ├── Gopkg.toml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── adapter.go │ │ │ ├── any.go │ │ │ ├── any_array.go │ │ │ ├── any_bool.go │ │ │ ├── any_float.go │ │ │ ├── any_int32.go │ │ │ ├── any_int64.go │ │ │ ├── any_invalid.go │ │ │ ├── any_nil.go │ │ │ ├── any_number.go │ │ │ ├── any_object.go │ │ │ ├── any_str.go │ │ │ ├── any_uint32.go │ │ │ ├── any_uint64.go │ │ │ ├── build.sh │ │ │ ├── config.go │ │ │ ├── fuzzy_mode_convert_table.md │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── iter.go │ │ │ ├── iter_array.go │ │ │ ├── iter_float.go │ │ │ ├── iter_int.go │ │ │ ├── iter_object.go │ │ │ ├── iter_skip.go │ │ │ ├── iter_skip_sloppy.go │ │ │ ├── iter_skip_strict.go │ │ │ ├── iter_str.go │ │ │ ├── jsoniter.go │ │ │ ├── pool.go │ │ │ ├── reflect.go │ │ │ ├── reflect_array.go │ │ │ ├── reflect_dynamic.go │ │ │ ├── reflect_extension.go │ │ │ ├── reflect_json_number.go │ │ │ ├── reflect_json_raw_message.go │ │ │ ├── reflect_map.go │ │ │ ├── reflect_marshaler.go │ │ │ ├── reflect_native.go │ │ │ ├── reflect_optional.go │ │ │ ├── reflect_slice.go │ │ │ ├── reflect_struct_decoder.go │ │ │ ├── reflect_struct_encoder.go │ │ │ ├── stream.go │ │ │ ├── stream_float.go │ │ │ ├── stream_int.go │ │ │ ├── stream_str.go │ │ │ └── test.sh │ ├── leodido │ │ └── go-urn │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── machine.go │ │ │ ├── machine.go.rl │ │ │ ├── makefile │ │ │ └── urn.go │ ├── mattn │ │ ├── go-isatty │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── doc.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── go.test.sh │ │ │ ├── isatty_bsd.go │ │ │ ├── isatty_others.go │ │ │ ├── isatty_plan9.go │ │ │ ├── isatty_solaris.go │ │ │ ├── isatty_tcgets.go │ │ │ ├── isatty_windows.go │ │ │ └── renovate.json │ │ └── go-sqlite3 │ │ │ ├── .codecov.yml │ │ │ ├── .gitignore │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── backup.go │ │ │ ├── callback.go │ │ │ ├── convert.go │ │ │ ├── doc.go │ │ │ ├── error.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── sqlite3-binding.c │ │ │ ├── sqlite3-binding.h │ │ │ ├── sqlite3.go │ │ │ ├── sqlite3_context.go │ │ │ ├── sqlite3_func_crypt.go │ │ │ ├── sqlite3_go18.go │ │ │ ├── sqlite3_libsqlite3.go │ │ │ ├── sqlite3_load_extension.go │ │ │ ├── sqlite3_load_extension_omit.go │ │ │ ├── sqlite3_opt_allow_uri_authority.go │ │ │ ├── sqlite3_opt_app_armor.go │ │ │ ├── sqlite3_opt_column_metadata.go │ │ │ ├── sqlite3_opt_foreign_keys.go │ │ │ ├── sqlite3_opt_fts5.go │ │ │ ├── sqlite3_opt_icu.go │ │ │ ├── sqlite3_opt_introspect.go │ │ │ ├── sqlite3_opt_json1.go │ │ │ ├── sqlite3_opt_preupdate.go │ │ │ ├── sqlite3_opt_preupdate_hook.go │ │ │ ├── sqlite3_opt_preupdate_omit.go │ │ │ ├── sqlite3_opt_secure_delete.go │ │ │ ├── sqlite3_opt_secure_delete_fast.go │ │ │ ├── sqlite3_opt_stat4.go │ │ │ ├── sqlite3_opt_unlock_notify.c │ │ │ ├── sqlite3_opt_unlock_notify.go │ │ │ ├── sqlite3_opt_userauth.go │ │ │ ├── sqlite3_opt_userauth_omit.go │ │ │ ├── sqlite3_opt_vacuum_full.go │ │ │ ├── sqlite3_opt_vacuum_incr.go │ │ │ ├── sqlite3_opt_vtable.go │ │ │ ├── sqlite3_other.go │ │ │ ├── sqlite3_solaris.go │ │ │ ├── sqlite3_trace.go │ │ │ ├── sqlite3_type.go │ │ │ ├── sqlite3_usleep_windows.go │ │ │ ├── sqlite3_windows.go │ │ │ ├── sqlite3ext.h │ │ │ └── static_mock.go │ ├── modern-go │ │ ├── concurrent │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── executor.go │ │ │ ├── go_above_19.go │ │ │ ├── go_below_19.go │ │ │ └── unbounded_executor.go │ │ └── reflect2 │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── Gopkg.lock │ │ │ ├── Gopkg.toml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go_above_17.go │ │ │ ├── go_above_19.go │ │ │ ├── go_below_17.go │ │ │ ├── go_below_19.go │ │ │ ├── reflect2.go │ │ │ ├── reflect2_amd64.s │ │ │ ├── reflect2_kind.go │ │ │ ├── relfect2_386.s │ │ │ ├── relfect2_amd64p32.s │ │ │ ├── relfect2_arm.s │ │ │ ├── relfect2_arm64.s │ │ │ ├── relfect2_mips64x.s │ │ │ ├── relfect2_mipsx.s │ │ │ ├── relfect2_ppc64x.s │ │ │ ├── relfect2_s390x.s │ │ │ ├── safe_field.go │ │ │ ├── safe_map.go │ │ │ ├── safe_slice.go │ │ │ ├── safe_struct.go │ │ │ ├── safe_type.go │ │ │ ├── test.sh │ │ │ ├── type_map.go │ │ │ ├── unsafe_array.go │ │ │ ├── unsafe_eface.go │ │ │ ├── unsafe_field.go │ │ │ ├── unsafe_iface.go │ │ │ ├── unsafe_link.go │ │ │ ├── unsafe_map.go │ │ │ ├── unsafe_ptr.go │ │ │ ├── unsafe_slice.go │ │ │ ├── unsafe_struct.go │ │ │ └── unsafe_type.go │ ├── nicksnyder │ │ └── go-i18n │ │ │ └── v2 │ │ │ ├── LICENSE │ │ │ ├── i18n │ │ │ ├── bundle.go │ │ │ ├── doc.go │ │ │ ├── localizer.go │ │ │ ├── message.go │ │ │ ├── message_template.go │ │ │ └── parse.go │ │ │ └── internal │ │ │ ├── plural │ │ │ ├── doc.go │ │ │ ├── form.go │ │ │ ├── operands.go │ │ │ ├── rule.go │ │ │ ├── rule_gen.go │ │ │ └── rules.go │ │ │ └── template.go │ ├── oklog │ │ └── ulid │ │ │ └── v2 │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── AUTHORS.md │ │ │ ├── CHANGELOG.md │ │ │ ├── CONTRIBUTING.md │ │ │ ├── Gopkg.lock │ │ │ ├── Gopkg.toml │ │ │ ├── LICENSE │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ └── ulid.go │ ├── pkg │ │ └── errors │ │ │ ├── .gitignore │ │ │ ├── .travis.yml │ │ │ ├── LICENSE │ │ │ ├── Makefile │ │ │ ├── README.md │ │ │ ├── appveyor.yml │ │ │ ├── errors.go │ │ │ ├── go113.go │ │ │ └── stack.go │ ├── ugorji │ │ └── go │ │ │ └── codec │ │ │ ├── 0_importpath.go │ │ │ ├── LICENSE │ │ │ ├── binc.go │ │ │ ├── build.sh │ │ │ ├── cbor.go │ │ │ ├── codecgen.go │ │ │ ├── decode.go │ │ │ ├── doc.go │ │ │ ├── encode.go │ │ │ ├── fast-path.generated.go │ │ │ ├── fast-path.go.tmpl │ │ │ ├── fast-path.not.go │ │ │ ├── float.go │ │ │ ├── gen-dec-array.go.tmpl │ │ │ ├── gen-dec-map.go.tmpl │ │ │ ├── gen-enc-chan.go.tmpl │ │ │ ├── gen-helper.generated.go │ │ │ ├── gen-helper.go.tmpl │ │ │ ├── gen.generated.go │ │ │ ├── gen.go │ │ │ ├── go.mod │ │ │ ├── goversion_arrayof_gte_go15.go │ │ │ ├── goversion_arrayof_lt_go15.go │ │ │ ├── goversion_fmt_time_gte_go15.go │ │ │ ├── goversion_fmt_time_lt_go15.go │ │ │ ├── goversion_makemap_gte_go19.go │ │ │ ├── goversion_makemap_lt_go19.go │ │ │ ├── goversion_maprange_gte_go112.go │ │ │ ├── goversion_maprange_lt_go112.go │ │ │ ├── goversion_unexportedembeddedptr_gte_go110.go │ │ │ ├── goversion_unexportedembeddedptr_lt_go110.go │ │ │ ├── goversion_unsupported_lt_go14.go │ │ │ ├── goversion_vendor_eq_go15.go │ │ │ ├── goversion_vendor_eq_go16.go │ │ │ ├── goversion_vendor_gte_go17.go │ │ │ ├── goversion_vendor_lt_go15.go │ │ │ ├── helper.go │ │ │ ├── helper.s │ │ │ ├── helper_internal.go │ │ │ ├── helper_not_unsafe.go │ │ │ ├── helper_unsafe.go │ │ │ ├── json.go │ │ │ ├── mammoth-test.go.tmpl │ │ │ ├── mammoth2-test.go.tmpl │ │ │ ├── msgpack.go │ │ │ ├── prebuild.go │ │ │ ├── reader.go │ │ │ ├── register_ext.go │ │ │ ├── rpc.go │ │ │ ├── simple.go │ │ │ ├── sort-slice.generated.go │ │ │ ├── sort-slice.go.tmpl │ │ │ ├── test-cbor-goldens.json │ │ │ ├── test.py │ │ │ └── writer.go │ └── ulule │ │ └── limiter │ │ └── v3 │ │ ├── .dockerignore │ │ ├── .editorconfig │ │ ├── .gitignore │ │ ├── .golangci.yml │ │ ├── AUTHORS │ │ ├── LICENSE │ │ ├── Makefile │ │ ├── README.md │ │ ├── defaults.go │ │ ├── drivers │ │ ├── middleware │ │ │ └── gin │ │ │ │ ├── middleware.go │ │ │ │ └── options.go │ │ └── store │ │ │ ├── common │ │ │ └── context.go │ │ │ └── memory │ │ │ ├── cache.go │ │ │ └── store.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── internal │ │ └── bytebuffer │ │ │ └── pool.go │ │ ├── limiter.go │ │ ├── network.go │ │ ├── options.go │ │ ├── rate.go │ │ └── store.go ├── golang.org │ └── x │ │ ├── crypto │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── bcrypt │ │ │ ├── base64.go │ │ │ └── bcrypt.go │ │ ├── blowfish │ │ │ ├── block.go │ │ │ ├── cipher.go │ │ │ └── const.go │ │ ├── pbkdf2 │ │ │ └── pbkdf2.go │ │ └── sha3 │ │ │ ├── doc.go │ │ │ ├── hashes.go │ │ │ ├── hashes_generic.go │ │ │ ├── keccakf.go │ │ │ ├── keccakf_amd64.go │ │ │ ├── keccakf_amd64.s │ │ │ ├── register.go │ │ │ ├── sha3.go │ │ │ ├── sha3_s390x.go │ │ │ ├── sha3_s390x.s │ │ │ ├── shake.go │ │ │ ├── shake_generic.go │ │ │ ├── xor.go │ │ │ ├── xor_generic.go │ │ │ └── xor_unaligned.go │ │ ├── sys │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── cpu │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── byteorder.go │ │ │ ├── cpu.go │ │ │ ├── cpu_aix.go │ │ │ ├── cpu_arm.go │ │ │ ├── cpu_arm64.go │ │ │ ├── cpu_arm64.s │ │ │ ├── cpu_gc_arm64.go │ │ │ ├── cpu_gc_s390x.go │ │ │ ├── cpu_gc_x86.go │ │ │ ├── cpu_gccgo_arm64.go │ │ │ ├── cpu_gccgo_s390x.go │ │ │ ├── cpu_gccgo_x86.c │ │ │ ├── cpu_gccgo_x86.go │ │ │ ├── cpu_linux.go │ │ │ ├── cpu_linux_arm.go │ │ │ ├── cpu_linux_arm64.go │ │ │ ├── cpu_linux_mips64x.go │ │ │ ├── cpu_linux_noinit.go │ │ │ ├── cpu_linux_ppc64x.go │ │ │ ├── cpu_linux_s390x.go │ │ │ ├── cpu_mips64x.go │ │ │ ├── cpu_mipsx.go │ │ │ ├── cpu_netbsd_arm64.go │ │ │ ├── cpu_other_arm.go │ │ │ ├── cpu_other_arm64.go │ │ │ ├── cpu_other_mips64x.go │ │ │ ├── cpu_ppc64x.go │ │ │ ├── cpu_riscv64.go │ │ │ ├── cpu_s390x.go │ │ │ ├── cpu_s390x.s │ │ │ ├── cpu_wasm.go │ │ │ ├── cpu_x86.go │ │ │ ├── cpu_x86.s │ │ │ ├── cpu_zos.go │ │ │ ├── cpu_zos_s390x.go │ │ │ ├── hwcap_linux.go │ │ │ ├── syscall_aix_gccgo.go │ │ │ └── syscall_aix_ppc64_gc.go │ │ ├── internal │ │ │ └── unsafeheader │ │ │ │ └── unsafeheader.go │ │ └── unix │ │ │ ├── .gitignore │ │ │ ├── README.md │ │ │ ├── affinity_linux.go │ │ │ ├── aliases.go │ │ │ ├── asm_aix_ppc64.s │ │ │ ├── asm_bsd_386.s │ │ │ ├── asm_bsd_amd64.s │ │ │ ├── asm_bsd_arm.s │ │ │ ├── asm_bsd_arm64.s │ │ │ ├── asm_linux_386.s │ │ │ ├── asm_linux_amd64.s │ │ │ ├── asm_linux_arm.s │ │ │ ├── asm_linux_arm64.s │ │ │ ├── asm_linux_mips64x.s │ │ │ ├── asm_linux_mipsx.s │ │ │ ├── asm_linux_ppc64x.s │ │ │ ├── asm_linux_riscv64.s │ │ │ ├── asm_linux_s390x.s │ │ │ ├── asm_openbsd_mips64.s │ │ │ ├── asm_solaris_amd64.s │ │ │ ├── asm_zos_s390x.s │ │ │ ├── bluetooth_linux.go │ │ │ ├── cap_freebsd.go │ │ │ ├── constants.go │ │ │ ├── dev_aix_ppc.go │ │ │ ├── dev_aix_ppc64.go │ │ │ ├── dev_darwin.go │ │ │ ├── dev_dragonfly.go │ │ │ ├── dev_freebsd.go │ │ │ ├── dev_linux.go │ │ │ ├── dev_netbsd.go │ │ │ ├── dev_openbsd.go │ │ │ ├── dev_zos.go │ │ │ ├── dirent.go │ │ │ ├── endian_big.go │ │ │ ├── endian_little.go │ │ │ ├── env_unix.go │ │ │ ├── epoll_zos.go │ │ │ ├── errors_freebsd_386.go │ │ │ ├── errors_freebsd_amd64.go │ │ │ ├── errors_freebsd_arm.go │ │ │ ├── errors_freebsd_arm64.go │ │ │ ├── fcntl.go │ │ │ ├── fcntl_darwin.go │ │ │ ├── fcntl_linux_32bit.go │ │ │ ├── fdset.go │ │ │ ├── fstatfs_zos.go │ │ │ ├── gccgo.go │ │ │ ├── gccgo_c.c │ │ │ ├── gccgo_linux_amd64.go │ │ │ ├── ioctl.go │ │ │ ├── ioctl_linux.go │ │ │ ├── ioctl_zos.go │ │ │ ├── mkall.sh │ │ │ ├── mkerrors.sh │ │ │ ├── pagesize_unix.go │ │ │ ├── pledge_openbsd.go │ │ │ ├── ptrace_darwin.go │ │ │ ├── ptrace_ios.go │ │ │ ├── race.go │ │ │ ├── race0.go │ │ │ ├── readdirent_getdents.go │ │ │ ├── readdirent_getdirentries.go │ │ │ ├── sockcmsg_dragonfly.go │ │ │ ├── sockcmsg_linux.go │ │ │ ├── sockcmsg_unix.go │ │ │ ├── sockcmsg_unix_other.go │ │ │ ├── str.go │ │ │ ├── syscall.go │ │ │ ├── syscall_aix.go │ │ │ ├── syscall_aix_ppc.go │ │ │ ├── syscall_aix_ppc64.go │ │ │ ├── syscall_bsd.go │ │ │ ├── syscall_darwin.1_12.go │ │ │ ├── syscall_darwin.1_13.go │ │ │ ├── syscall_darwin.go │ │ │ ├── syscall_darwin_amd64.go │ │ │ ├── syscall_darwin_arm64.go │ │ │ ├── syscall_darwin_libSystem.go │ │ │ ├── syscall_dragonfly.go │ │ │ ├── syscall_dragonfly_amd64.go │ │ │ ├── syscall_freebsd.go │ │ │ ├── syscall_freebsd_386.go │ │ │ ├── syscall_freebsd_amd64.go │ │ │ ├── syscall_freebsd_arm.go │ │ │ ├── syscall_freebsd_arm64.go │ │ │ ├── syscall_illumos.go │ │ │ ├── syscall_linux.go │ │ │ ├── syscall_linux_386.go │ │ │ ├── syscall_linux_amd64.go │ │ │ ├── syscall_linux_amd64_gc.go │ │ │ ├── syscall_linux_arm.go │ │ │ ├── syscall_linux_arm64.go │ │ │ ├── syscall_linux_gc.go │ │ │ ├── syscall_linux_gc_386.go │ │ │ ├── syscall_linux_gc_arm.go │ │ │ ├── syscall_linux_gccgo_386.go │ │ │ ├── syscall_linux_gccgo_arm.go │ │ │ ├── syscall_linux_mips64x.go │ │ │ ├── syscall_linux_mipsx.go │ │ │ ├── syscall_linux_ppc.go │ │ │ ├── syscall_linux_ppc64x.go │ │ │ ├── syscall_linux_riscv64.go │ │ │ ├── syscall_linux_s390x.go │ │ │ ├── syscall_linux_sparc64.go │ │ │ ├── syscall_netbsd.go │ │ │ ├── syscall_netbsd_386.go │ │ │ ├── syscall_netbsd_amd64.go │ │ │ ├── syscall_netbsd_arm.go │ │ │ ├── syscall_netbsd_arm64.go │ │ │ ├── syscall_openbsd.go │ │ │ ├── syscall_openbsd_386.go │ │ │ ├── syscall_openbsd_amd64.go │ │ │ ├── syscall_openbsd_arm.go │ │ │ ├── syscall_openbsd_arm64.go │ │ │ ├── syscall_openbsd_mips64.go │ │ │ ├── syscall_solaris.go │ │ │ ├── syscall_solaris_amd64.go │ │ │ ├── syscall_unix.go │ │ │ ├── syscall_unix_gc.go │ │ │ ├── syscall_unix_gc_ppc64x.go │ │ │ ├── syscall_zos_s390x.go │ │ │ ├── timestruct.go │ │ │ ├── unveil_openbsd.go │ │ │ ├── xattr_bsd.go │ │ │ ├── zerrors_aix_ppc.go │ │ │ ├── zerrors_aix_ppc64.go │ │ │ ├── zerrors_darwin_amd64.go │ │ │ ├── zerrors_darwin_arm64.go │ │ │ ├── zerrors_dragonfly_amd64.go │ │ │ ├── zerrors_freebsd_386.go │ │ │ ├── zerrors_freebsd_amd64.go │ │ │ ├── zerrors_freebsd_arm.go │ │ │ ├── zerrors_freebsd_arm64.go │ │ │ ├── zerrors_linux.go │ │ │ ├── zerrors_linux_386.go │ │ │ ├── zerrors_linux_amd64.go │ │ │ ├── zerrors_linux_arm.go │ │ │ ├── zerrors_linux_arm64.go │ │ │ ├── zerrors_linux_mips.go │ │ │ ├── zerrors_linux_mips64.go │ │ │ ├── zerrors_linux_mips64le.go │ │ │ ├── zerrors_linux_mipsle.go │ │ │ ├── zerrors_linux_ppc.go │ │ │ ├── zerrors_linux_ppc64.go │ │ │ ├── zerrors_linux_ppc64le.go │ │ │ ├── zerrors_linux_riscv64.go │ │ │ ├── zerrors_linux_s390x.go │ │ │ ├── zerrors_linux_sparc64.go │ │ │ ├── zerrors_netbsd_386.go │ │ │ ├── zerrors_netbsd_amd64.go │ │ │ ├── zerrors_netbsd_arm.go │ │ │ ├── zerrors_netbsd_arm64.go │ │ │ ├── zerrors_openbsd_386.go │ │ │ ├── zerrors_openbsd_amd64.go │ │ │ ├── zerrors_openbsd_arm.go │ │ │ ├── zerrors_openbsd_arm64.go │ │ │ ├── zerrors_openbsd_mips64.go │ │ │ ├── zerrors_solaris_amd64.go │ │ │ ├── zerrors_zos_s390x.go │ │ │ ├── zptrace_armnn_linux.go │ │ │ ├── zptrace_linux_arm64.go │ │ │ ├── zptrace_mipsnn_linux.go │ │ │ ├── zptrace_mipsnnle_linux.go │ │ │ ├── zptrace_x86_linux.go │ │ │ ├── zsyscall_aix_ppc.go │ │ │ ├── zsyscall_aix_ppc64.go │ │ │ ├── zsyscall_aix_ppc64_gc.go │ │ │ ├── zsyscall_aix_ppc64_gccgo.go │ │ │ ├── zsyscall_darwin_amd64.1_13.go │ │ │ ├── zsyscall_darwin_amd64.1_13.s │ │ │ ├── zsyscall_darwin_amd64.go │ │ │ ├── zsyscall_darwin_amd64.s │ │ │ ├── zsyscall_darwin_arm64.1_13.go │ │ │ ├── zsyscall_darwin_arm64.1_13.s │ │ │ ├── zsyscall_darwin_arm64.go │ │ │ ├── zsyscall_darwin_arm64.s │ │ │ ├── zsyscall_dragonfly_amd64.go │ │ │ ├── zsyscall_freebsd_386.go │ │ │ ├── zsyscall_freebsd_amd64.go │ │ │ ├── zsyscall_freebsd_arm.go │ │ │ ├── zsyscall_freebsd_arm64.go │ │ │ ├── zsyscall_illumos_amd64.go │ │ │ ├── zsyscall_linux.go │ │ │ ├── zsyscall_linux_386.go │ │ │ ├── zsyscall_linux_amd64.go │ │ │ ├── zsyscall_linux_arm.go │ │ │ ├── zsyscall_linux_arm64.go │ │ │ ├── zsyscall_linux_mips.go │ │ │ ├── zsyscall_linux_mips64.go │ │ │ ├── zsyscall_linux_mips64le.go │ │ │ ├── zsyscall_linux_mipsle.go │ │ │ ├── zsyscall_linux_ppc.go │ │ │ ├── zsyscall_linux_ppc64.go │ │ │ ├── zsyscall_linux_ppc64le.go │ │ │ ├── zsyscall_linux_riscv64.go │ │ │ ├── zsyscall_linux_s390x.go │ │ │ ├── zsyscall_linux_sparc64.go │ │ │ ├── zsyscall_netbsd_386.go │ │ │ ├── zsyscall_netbsd_amd64.go │ │ │ ├── zsyscall_netbsd_arm.go │ │ │ ├── zsyscall_netbsd_arm64.go │ │ │ ├── zsyscall_openbsd_386.go │ │ │ ├── zsyscall_openbsd_amd64.go │ │ │ ├── zsyscall_openbsd_arm.go │ │ │ ├── zsyscall_openbsd_arm64.go │ │ │ ├── zsyscall_openbsd_mips64.go │ │ │ ├── zsyscall_solaris_amd64.go │ │ │ ├── zsyscall_zos_s390x.go │ │ │ ├── zsysctl_openbsd_386.go │ │ │ ├── zsysctl_openbsd_amd64.go │ │ │ ├── zsysctl_openbsd_arm.go │ │ │ ├── zsysctl_openbsd_arm64.go │ │ │ ├── zsysctl_openbsd_mips64.go │ │ │ ├── zsysnum_darwin_amd64.go │ │ │ ├── zsysnum_darwin_arm64.go │ │ │ ├── zsysnum_dragonfly_amd64.go │ │ │ ├── zsysnum_freebsd_386.go │ │ │ ├── zsysnum_freebsd_amd64.go │ │ │ ├── zsysnum_freebsd_arm.go │ │ │ ├── zsysnum_freebsd_arm64.go │ │ │ ├── zsysnum_linux_386.go │ │ │ ├── zsysnum_linux_amd64.go │ │ │ ├── zsysnum_linux_arm.go │ │ │ ├── zsysnum_linux_arm64.go │ │ │ ├── zsysnum_linux_mips.go │ │ │ ├── zsysnum_linux_mips64.go │ │ │ ├── zsysnum_linux_mips64le.go │ │ │ ├── zsysnum_linux_mipsle.go │ │ │ ├── zsysnum_linux_ppc.go │ │ │ ├── zsysnum_linux_ppc64.go │ │ │ ├── zsysnum_linux_ppc64le.go │ │ │ ├── zsysnum_linux_riscv64.go │ │ │ ├── zsysnum_linux_s390x.go │ │ │ ├── zsysnum_linux_sparc64.go │ │ │ ├── zsysnum_netbsd_386.go │ │ │ ├── zsysnum_netbsd_amd64.go │ │ │ ├── zsysnum_netbsd_arm.go │ │ │ ├── zsysnum_netbsd_arm64.go │ │ │ ├── zsysnum_openbsd_386.go │ │ │ ├── zsysnum_openbsd_amd64.go │ │ │ ├── zsysnum_openbsd_arm.go │ │ │ ├── zsysnum_openbsd_arm64.go │ │ │ ├── zsysnum_openbsd_mips64.go │ │ │ ├── zsysnum_zos_s390x.go │ │ │ ├── ztypes_aix_ppc.go │ │ │ ├── ztypes_aix_ppc64.go │ │ │ ├── ztypes_darwin_amd64.go │ │ │ ├── ztypes_darwin_arm64.go │ │ │ ├── ztypes_dragonfly_amd64.go │ │ │ ├── ztypes_freebsd_386.go │ │ │ ├── ztypes_freebsd_amd64.go │ │ │ ├── ztypes_freebsd_arm.go │ │ │ ├── ztypes_freebsd_arm64.go │ │ │ ├── ztypes_illumos_amd64.go │ │ │ ├── ztypes_linux.go │ │ │ ├── ztypes_linux_386.go │ │ │ ├── ztypes_linux_amd64.go │ │ │ ├── ztypes_linux_arm.go │ │ │ ├── ztypes_linux_arm64.go │ │ │ ├── ztypes_linux_mips.go │ │ │ ├── ztypes_linux_mips64.go │ │ │ ├── ztypes_linux_mips64le.go │ │ │ ├── ztypes_linux_mipsle.go │ │ │ ├── ztypes_linux_ppc.go │ │ │ ├── ztypes_linux_ppc64.go │ │ │ ├── ztypes_linux_ppc64le.go │ │ │ ├── ztypes_linux_riscv64.go │ │ │ ├── ztypes_linux_s390x.go │ │ │ ├── ztypes_linux_sparc64.go │ │ │ ├── ztypes_netbsd_386.go │ │ │ ├── ztypes_netbsd_amd64.go │ │ │ ├── ztypes_netbsd_arm.go │ │ │ ├── ztypes_netbsd_arm64.go │ │ │ ├── ztypes_openbsd_386.go │ │ │ ├── ztypes_openbsd_amd64.go │ │ │ ├── ztypes_openbsd_arm.go │ │ │ ├── ztypes_openbsd_arm64.go │ │ │ ├── ztypes_openbsd_mips64.go │ │ │ ├── ztypes_solaris_amd64.go │ │ │ └── ztypes_zos_s390x.go │ │ └── text │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── cases │ │ ├── cases.go │ │ ├── context.go │ │ ├── fold.go │ │ ├── icu.go │ │ ├── info.go │ │ ├── map.go │ │ ├── tables10.0.0.go │ │ ├── tables11.0.0.go │ │ ├── tables12.0.0.go │ │ ├── tables13.0.0.go │ │ ├── tables9.0.0.go │ │ └── trieval.go │ │ ├── internal │ │ ├── internal.go │ │ ├── language │ │ │ ├── common.go │ │ │ ├── compact.go │ │ │ ├── compact │ │ │ │ ├── compact.go │ │ │ │ ├── language.go │ │ │ │ ├── parents.go │ │ │ │ ├── tables.go │ │ │ │ └── tags.go │ │ │ ├── compose.go │ │ │ ├── coverage.go │ │ │ ├── language.go │ │ │ ├── lookup.go │ │ │ ├── match.go │ │ │ ├── parse.go │ │ │ ├── tables.go │ │ │ └── tags.go │ │ ├── match.go │ │ └── tag │ │ │ └── tag.go │ │ ├── language │ │ ├── coverage.go │ │ ├── doc.go │ │ ├── go1_1.go │ │ ├── go1_2.go │ │ ├── language.go │ │ ├── match.go │ │ ├── parse.go │ │ ├── tables.go │ │ └── tags.go │ │ ├── runes │ │ ├── cond.go │ │ └── runes.go │ │ ├── secure │ │ ├── bidirule │ │ │ ├── bidirule.go │ │ │ ├── bidirule10.0.0.go │ │ │ └── bidirule9.0.0.go │ │ └── precis │ │ │ ├── class.go │ │ │ ├── context.go │ │ │ ├── doc.go │ │ │ ├── nickname.go │ │ │ ├── options.go │ │ │ ├── profile.go │ │ │ ├── profiles.go │ │ │ ├── tables10.0.0.go │ │ │ ├── tables11.0.0.go │ │ │ ├── tables12.0.0.go │ │ │ ├── tables13.0.0.go │ │ │ ├── tables9.0.0.go │ │ │ ├── transformer.go │ │ │ └── trieval.go │ │ ├── transform │ │ └── transform.go │ │ ├── unicode │ │ ├── bidi │ │ │ ├── bidi.go │ │ │ ├── bracket.go │ │ │ ├── core.go │ │ │ ├── prop.go │ │ │ ├── tables10.0.0.go │ │ │ ├── tables11.0.0.go │ │ │ ├── tables12.0.0.go │ │ │ ├── tables13.0.0.go │ │ │ ├── tables9.0.0.go │ │ │ └── trieval.go │ │ └── norm │ │ │ ├── composition.go │ │ │ ├── forminfo.go │ │ │ ├── input.go │ │ │ ├── iter.go │ │ │ ├── normalize.go │ │ │ ├── readwriter.go │ │ │ ├── tables10.0.0.go │ │ │ ├── tables11.0.0.go │ │ │ ├── tables12.0.0.go │ │ │ ├── tables13.0.0.go │ │ │ ├── tables9.0.0.go │ │ │ ├── transform.go │ │ │ └── trie.go │ │ └── width │ │ ├── kind_string.go │ │ ├── tables10.0.0.go │ │ ├── tables11.0.0.go │ │ ├── tables12.0.0.go │ │ ├── tables13.0.0.go │ │ ├── tables9.0.0.go │ │ ├── transform.go │ │ ├── trieval.go │ │ └── width.go ├── google.golang.org │ └── protobuf │ │ ├── AUTHORS │ │ ├── CONTRIBUTORS │ │ ├── LICENSE │ │ ├── PATENTS │ │ ├── encoding │ │ ├── prototext │ │ │ ├── decode.go │ │ │ ├── doc.go │ │ │ └── encode.go │ │ └── protowire │ │ │ └── wire.go │ │ ├── internal │ │ ├── descfmt │ │ │ └── stringer.go │ │ ├── descopts │ │ │ └── options.go │ │ ├── detrand │ │ │ └── rand.go │ │ ├── encoding │ │ │ ├── defval │ │ │ │ └── default.go │ │ │ ├── messageset │ │ │ │ └── messageset.go │ │ │ ├── tag │ │ │ │ └── tag.go │ │ │ └── text │ │ │ │ ├── decode.go │ │ │ │ ├── decode_number.go │ │ │ │ ├── decode_string.go │ │ │ │ ├── decode_token.go │ │ │ │ ├── doc.go │ │ │ │ └── encode.go │ │ ├── errors │ │ │ ├── errors.go │ │ │ ├── is_go112.go │ │ │ └── is_go113.go │ │ ├── filedesc │ │ │ ├── build.go │ │ │ ├── desc.go │ │ │ ├── desc_init.go │ │ │ ├── desc_lazy.go │ │ │ ├── desc_list.go │ │ │ ├── desc_list_gen.go │ │ │ └── placeholder.go │ │ ├── filetype │ │ │ └── build.go │ │ ├── flags │ │ │ ├── flags.go │ │ │ ├── proto_legacy_disable.go │ │ │ └── proto_legacy_enable.go │ │ ├── genid │ │ │ ├── any_gen.go │ │ │ ├── api_gen.go │ │ │ ├── descriptor_gen.go │ │ │ ├── doc.go │ │ │ ├── duration_gen.go │ │ │ ├── empty_gen.go │ │ │ ├── field_mask_gen.go │ │ │ ├── goname.go │ │ │ ├── map_entry.go │ │ │ ├── source_context_gen.go │ │ │ ├── struct_gen.go │ │ │ ├── timestamp_gen.go │ │ │ ├── type_gen.go │ │ │ ├── wrappers.go │ │ │ └── wrappers_gen.go │ │ ├── impl │ │ │ ├── api_export.go │ │ │ ├── checkinit.go │ │ │ ├── codec_extension.go │ │ │ ├── codec_field.go │ │ │ ├── codec_gen.go │ │ │ ├── codec_map.go │ │ │ ├── codec_map_go111.go │ │ │ ├── codec_map_go112.go │ │ │ ├── codec_message.go │ │ │ ├── codec_messageset.go │ │ │ ├── codec_reflect.go │ │ │ ├── codec_tables.go │ │ │ ├── codec_unsafe.go │ │ │ ├── convert.go │ │ │ ├── convert_list.go │ │ │ ├── convert_map.go │ │ │ ├── decode.go │ │ │ ├── encode.go │ │ │ ├── enum.go │ │ │ ├── extension.go │ │ │ ├── legacy_enum.go │ │ │ ├── legacy_export.go │ │ │ ├── legacy_extension.go │ │ │ ├── legacy_file.go │ │ │ ├── legacy_message.go │ │ │ ├── merge.go │ │ │ ├── merge_gen.go │ │ │ ├── message.go │ │ │ ├── message_reflect.go │ │ │ ├── message_reflect_field.go │ │ │ ├── message_reflect_gen.go │ │ │ ├── pointer_reflect.go │ │ │ ├── pointer_unsafe.go │ │ │ ├── validate.go │ │ │ └── weak.go │ │ ├── order │ │ │ ├── order.go │ │ │ └── range.go │ │ ├── pragma │ │ │ └── pragma.go │ │ ├── set │ │ │ └── ints.go │ │ ├── strs │ │ │ ├── strings.go │ │ │ ├── strings_pure.go │ │ │ └── strings_unsafe.go │ │ └── version │ │ │ └── version.go │ │ ├── proto │ │ ├── checkinit.go │ │ ├── decode.go │ │ ├── decode_gen.go │ │ ├── doc.go │ │ ├── encode.go │ │ ├── encode_gen.go │ │ ├── equal.go │ │ ├── extension.go │ │ ├── merge.go │ │ ├── messageset.go │ │ ├── proto.go │ │ ├── proto_methods.go │ │ ├── proto_reflect.go │ │ ├── reset.go │ │ ├── size.go │ │ ├── size_gen.go │ │ └── wrappers.go │ │ ├── reflect │ │ ├── protodesc │ │ │ ├── desc.go │ │ │ ├── desc_init.go │ │ │ ├── desc_resolve.go │ │ │ ├── desc_validate.go │ │ │ └── proto.go │ │ ├── protoreflect │ │ │ ├── methods.go │ │ │ ├── proto.go │ │ │ ├── source.go │ │ │ ├── source_gen.go │ │ │ ├── type.go │ │ │ ├── value.go │ │ │ ├── value_pure.go │ │ │ ├── value_union.go │ │ │ └── value_unsafe.go │ │ └── protoregistry │ │ │ └── registry.go │ │ ├── runtime │ │ ├── protoiface │ │ │ ├── legacy.go │ │ │ └── methods.go │ │ └── protoimpl │ │ │ ├── impl.go │ │ │ └── version.go │ │ └── types │ │ └── descriptorpb │ │ └── descriptor.pb.go ├── gopkg.in │ └── yaml.v2 │ │ ├── .travis.yml │ │ ├── LICENSE │ │ ├── LICENSE.libyaml │ │ ├── NOTICE │ │ ├── README.md │ │ ├── apic.go │ │ ├── decode.go │ │ ├── emitterc.go │ │ ├── encode.go │ │ ├── go.mod │ │ ├── parserc.go │ │ ├── readerc.go │ │ ├── resolve.go │ │ ├── scannerc.go │ │ ├── sorter.go │ │ ├── writerc.go │ │ ├── yaml.go │ │ ├── yamlh.go │ │ └── yamlprivateh.go ├── gorm.io │ ├── driver │ │ ├── mysql │ │ │ ├── License │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── migrator.go │ │ │ └── mysql.go │ │ ├── postgres │ │ │ ├── License │ │ │ ├── README.md │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── migrator.go │ │ │ └── postgres.go │ │ └── sqlite │ │ │ ├── License │ │ │ ├── README.md │ │ │ ├── ddlmod.go │ │ │ ├── errors.go │ │ │ ├── go.mod │ │ │ ├── go.sum │ │ │ ├── migrator.go │ │ │ └── sqlite.go │ └── gorm │ │ ├── .gitignore │ │ ├── License │ │ ├── README.md │ │ ├── association.go │ │ ├── callbacks.go │ │ ├── callbacks │ │ ├── associations.go │ │ ├── callbacks.go │ │ ├── callmethod.go │ │ ├── create.go │ │ ├── delete.go │ │ ├── helper.go │ │ ├── interfaces.go │ │ ├── preload.go │ │ ├── query.go │ │ ├── raw.go │ │ ├── row.go │ │ ├── transaction.go │ │ └── update.go │ │ ├── chainable_api.go │ │ ├── clause │ │ ├── clause.go │ │ ├── delete.go │ │ ├── expression.go │ │ ├── from.go │ │ ├── group_by.go │ │ ├── insert.go │ │ ├── joins.go │ │ ├── limit.go │ │ ├── locking.go │ │ ├── on_conflict.go │ │ ├── order_by.go │ │ ├── returning.go │ │ ├── select.go │ │ ├── set.go │ │ ├── update.go │ │ ├── values.go │ │ ├── where.go │ │ └── with.go │ │ ├── errors.go │ │ ├── finisher_api.go │ │ ├── go.mod │ │ ├── go.sum │ │ ├── gorm.go │ │ ├── interfaces.go │ │ ├── logger │ │ ├── logger.go │ │ └── sql.go │ │ ├── migrator.go │ │ ├── migrator │ │ └── migrator.go │ │ ├── model.go │ │ ├── prepare_stmt.go │ │ ├── scan.go │ │ ├── schema │ │ ├── check.go │ │ ├── field.go │ │ ├── index.go │ │ ├── interfaces.go │ │ ├── naming.go │ │ ├── relationship.go │ │ ├── schema.go │ │ └── utils.go │ │ ├── soft_delete.go │ │ ├── statement.go │ │ └── utils │ │ └── utils.go └── modules.txt └── webpack.config.js /.gitignore: -------------------------------------------------------------------------------- 1 | .idea 2 | node_modules 3 | docker-compose.local.yml 4 | translate.*.toml -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM golang:1.16.5-alpine AS builder 2 | 3 | WORKDIR /app 4 | COPY . . 5 | RUN apk add --update nodejs npm 6 | RUN apk --no-cache add ca-certificates 7 | 8 | RUN npm install 9 | RUN npm run build 10 | 11 | RUN CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o "main" -ldflags="-w -s" ./cmd/base/main.go 12 | 13 | FROM scratch 14 | 15 | WORKDIR /app 16 | COPY --from=builder /app/active.en.toml /app/active.en.toml 17 | COPY --from=builder /app/active.sv.toml /app/active.sv.toml 18 | COPY --from=builder /app/main /usr/bin/ 19 | COPY --from=builder /etc/ssl/certs/ /etc/ssl/certs/ 20 | 21 | CMD ["main"] 22 | 23 | EXPOSE 80 -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | ISC License 2 | 3 | Copyright 2021 Markus Tenghamn (https://github.com/uberswe) m@rkus.io 4 | 5 | Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies. 6 | 7 | THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -------------------------------------------------------------------------------- /cmd/base/main.go: -------------------------------------------------------------------------------- 1 | package main 2 | 3 | import baseproject "github.com/uberswe/golang-base-project" 4 | 5 | func main() { 6 | baseproject.Run() 7 | } 8 | -------------------------------------------------------------------------------- /config/main.go: -------------------------------------------------------------------------------- 1 | // Package config defines the env configuration variables 2 | package config 3 | 4 | // Config defines all the configuration variables for the golang-base-project 5 | type Config struct { 6 | Port string 7 | CookieSecret string 8 | Database string 9 | DatabaseHost string 10 | DatabasePort string 11 | DatabaseName string 12 | DatabaseUsername string 13 | DatabasePassword string 14 | BaseURL string 15 | SMTPUsername string 16 | SMTPPassword string 17 | SMTPHost string 18 | SMTPPort string 19 | SMTPSender string 20 | RequestsPerMinute int 21 | CacheParameter string 22 | CacheMaxAge int 23 | } 24 | -------------------------------------------------------------------------------- /dist/assets/images/android-chrome-192x192.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/dist/assets/images/android-chrome-192x192.png -------------------------------------------------------------------------------- /dist/assets/images/android-chrome-512x512.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/dist/assets/images/android-chrome-512x512.png -------------------------------------------------------------------------------- /dist/assets/images/apple-touch-icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/dist/assets/images/apple-touch-icon.png -------------------------------------------------------------------------------- /dist/assets/images/favicon-16x16.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/dist/assets/images/favicon-16x16.png -------------------------------------------------------------------------------- /dist/assets/images/favicon-32x32.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/dist/assets/images/favicon-32x32.png -------------------------------------------------------------------------------- /dist/assets/images/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/dist/assets/images/favicon.ico -------------------------------------------------------------------------------- /dist/assets/images/site.webmanifest: -------------------------------------------------------------------------------- 1 | {"name":"","short_name":"","icons":[{"src":"/android-chrome-192x192.png","sizes":"192x192","type":"image/png"},{"src":"/android-chrome-512x512.png","sizes":"512x512","type":"image/png"}],"theme_color":"#ffffff","background_color":"#ffffff","display":"standalone"} -------------------------------------------------------------------------------- /dist/templates/404.html: -------------------------------------------------------------------------------- 1 | {{ template "head.html" . }} 2 | 3 |
4 |
5 |

{{ call .Trans "404 Not Found" }}

6 |

{{ call .Trans "The page you're looking for could not be found." }} {{ call .Trans "Click here" }} {{ call .Trans "to return to the main page." }}

7 |
8 |
9 | 10 | 11 | {{ template "tracking.html" }} 12 | 13 | -------------------------------------------------------------------------------- /dist/templates/activate.html: -------------------------------------------------------------------------------- 1 | {{ template "header.html" . }} 2 | 3 |
4 |
5 | {{ template "messages.html" . }} 6 |
7 |
8 | 9 | {{ template "footer.html" . }} 10 | -------------------------------------------------------------------------------- /dist/templates/admin.html: -------------------------------------------------------------------------------- 1 | {{ template "header.html" . }} 2 | 3 |
4 |
5 |

{{ call .Trans "Admin Dashboard" }}

6 | 7 | {{ template "messages.html" . }} 8 | 9 |

{{ call .Trans "You now have an authenticated session, feel free to log out using the link in the navbar above." }}

10 |

{{ call .Trans "Below is a chart showing the number of user sign ups to this website per month." }}

11 | {{ template "chart.html" .Chart }} 12 |
13 |
14 | 15 | {{ template "footer.html" . }} -------------------------------------------------------------------------------- /dist/templates/footer.html: -------------------------------------------------------------------------------- 1 | 6 | 7 | {{ template "tracking.html" }} 8 | 9 | -------------------------------------------------------------------------------- /dist/templates/forgotpassword.html: -------------------------------------------------------------------------------- 1 | {{ template "header.html" . }} 2 |
3 |
4 |

{{ call .Trans "Forgot password?" }}

5 | 6 | {{ template "messages.html" . }} 7 | 8 |

{{ call .Trans "Use the form below to reset your password. If we have an account with your email you will receive instructions on how to reset your passsword." }}

9 | 10 |
11 | 12 | 13 |
14 | 15 | 16 |
17 |
18 | {{ template "footer.html" . }} -------------------------------------------------------------------------------- /dist/templates/index.html: -------------------------------------------------------------------------------- 1 | {{ template "header.html" . }} 2 | 3 |
4 |
5 |

{{ call .Trans "site_name" }}

6 |

{{ call .Trans "A simple website with user login and registration." }} {{ call .Trans "The frontend uses" }} Bootstrap 5 {{ call .Trans "and the backend is written in" }} Go.

7 |

{{ call .Trans "Read more about this project on" }} GitHub.

8 |
9 |
10 | 11 | {{ template "footer.html" . }} 12 | -------------------------------------------------------------------------------- /dist/templates/messages.html: -------------------------------------------------------------------------------- 1 | {{ range $message := .Messages }} 2 | {{ if eq $message.Type "error" }} 3 | 6 | {{ else if eq $message.Type "success" }} 7 | 10 | {{ else }} 11 | 14 | {{ end }} 15 | {{ end }} -------------------------------------------------------------------------------- /dist/templates/resendactivation.html: -------------------------------------------------------------------------------- 1 | {{ template "header.html" . }} 2 |
3 |
4 |

{{ call .Trans "Resend Activation Email" }}

5 | 6 | {{ template "messages.html" . }} 7 | 8 |

{{ call .Trans "If you have already registered but never activated your account you can use the form below to request a new activation email." }}

9 | 10 |
11 | 12 | 13 |
14 | 15 | 16 |
17 |
18 | {{ template "footer.html" . }} -------------------------------------------------------------------------------- /dist/templates/resetpassword.html: -------------------------------------------------------------------------------- 1 | {{ template "header.html" . }} 2 |
3 |
4 |

{{ call .Trans "Reset password" }}

5 | 6 | {{ template "messages.html" . }} 7 | 8 |

{{ call .Trans "Please enter a new password." }}

9 | 10 |
11 | 12 | 13 |
14 | 15 | 16 |
17 |
18 | {{ template "footer.html" . }} -------------------------------------------------------------------------------- /dist/templates/tracking.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 19 | -------------------------------------------------------------------------------- /go.mod: -------------------------------------------------------------------------------- 1 | module github.com/uberswe/golang-base-project 2 | 3 | go 1.16 4 | 5 | require ( 6 | github.com/BurntSushi/toml v0.3.1 7 | github.com/gin-contrib/sessions v0.0.4 8 | github.com/gin-gonic/gin v1.7.7 9 | github.com/go-playground/validator/v10 v10.4.1 10 | github.com/gorilla/securecookie v1.1.1 11 | github.com/kr/text v0.2.0 // indirect 12 | github.com/nicksnyder/go-i18n/v2 v2.1.2 13 | github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect 14 | github.com/oklog/ulid/v2 v2.0.2 15 | github.com/ulule/limiter/v3 v3.9.0 16 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 17 | golang.org/x/text v0.3.7 18 | gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect 19 | gopkg.in/yaml.v3 v3.0.0-20200615113413-eeeca48fe776 // indirect 20 | gorm.io/driver/mysql v1.2.1 21 | gorm.io/driver/postgres v1.2.3 22 | gorm.io/driver/sqlite v1.2.6 23 | gorm.io/gorm v1.22.4 24 | ) 25 | -------------------------------------------------------------------------------- /middleware/auth.go: -------------------------------------------------------------------------------- 1 | // Package middleware defines all the middlewares for the application 2 | package middleware 3 | 4 | import ( 5 | "github.com/gin-gonic/gin" 6 | "net/http" 7 | ) 8 | 9 | // UserIDKey is the key used to set and get the user id in the context of the current request 10 | const UserIDKey = "UserID" 11 | 12 | // Auth middleware redirects to /login and aborts the current request if there is no authenticated user 13 | func Auth() gin.HandlerFunc { 14 | return func(c *gin.Context) { 15 | _, exists := c.Get(UserIDKey) 16 | if !exists { 17 | c.Redirect(http.StatusTemporaryRedirect, "/login") 18 | c.Abort() 19 | return 20 | } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /middleware/cache.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "fmt" 5 | "github.com/gin-gonic/gin" 6 | ) 7 | 8 | // Cache middleware sets the Cache-Control header 9 | func Cache(maxAge int) gin.HandlerFunc { 10 | return func(c *gin.Context) { 11 | c.Header("Cache-Control", fmt.Sprintf("public, max-age=%d", maxAge)) 12 | c.Next() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /middleware/general.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "os" 6 | ) 7 | 8 | // General handles the default headers that should be present in every response 9 | func General() gin.HandlerFunc { 10 | return func(c *gin.Context) { 11 | c.Header("X-Content-Type-Options", "nosniff") 12 | c.Header("X-XSS-Protection", "1; mode=block") 13 | c.Header("X-Frame-Options", "DENY") 14 | if os.Getenv("STRICT_TRANSPORT_SECURITY") == "true" { 15 | c.Header("Strict-Transport-Security", "max-age=63072000; includeSubDomains; preload;") 16 | } 17 | c.Next() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /middleware/noauth.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "net/http" 6 | ) 7 | 8 | // NoAuth is for routes that can only be accessed when the user is unauthenticated 9 | func NoAuth() gin.HandlerFunc { 10 | return func(c *gin.Context) { 11 | _, exists := c.Get(UserIDKey) 12 | if !exists { 13 | c.Next() 14 | return 15 | } 16 | c.Redirect(http.StatusTemporaryRedirect, "/admin") 17 | c.Abort() 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /middleware/sensitive.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | ) 6 | 7 | // Sensitive middleware handles headers that should be set for routes that may contain sensitive data such as personal information 8 | func Sensitive() gin.HandlerFunc { 9 | return func(c *gin.Context) { 10 | c.Header("Cache-control", "no-store") 11 | c.Header("Pragma", "no-cache") 12 | c.Next() 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /middleware/throttle.go: -------------------------------------------------------------------------------- 1 | package middleware 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "github.com/ulule/limiter/v3" 6 | middlewareGin "github.com/ulule/limiter/v3/drivers/middleware/gin" 7 | "github.com/ulule/limiter/v3/drivers/store/memory" 8 | "time" 9 | ) 10 | 11 | // Throttle middleware takes a limit per minute and blocks any additional requests that go over this limit 12 | func Throttle(limit int) gin.HandlerFunc { 13 | store := memory.NewStore() 14 | 15 | // Create a new middleware with the limiter instance. 16 | return middlewareGin.NewMiddleware(limiter.New(store, limiter.Rate{ 17 | Period: time.Minute, 18 | Limit: int64(limit), 19 | })) 20 | } 21 | -------------------------------------------------------------------------------- /models/session.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "gorm.io/gorm" 5 | "time" 6 | ) 7 | 8 | // Session holds information about user sessions and when they expire 9 | type Session struct { 10 | gorm.Model 11 | Identifier string 12 | UserID uint 13 | ExpiresAt time.Time 14 | } 15 | 16 | // HasExpired is a helper function that checks if the current time is after the session expire datetime 17 | func (s Session) HasExpired() bool { 18 | return s.ExpiresAt.Before(time.Now()) 19 | } 20 | -------------------------------------------------------------------------------- /models/token.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import ( 4 | "gorm.io/gorm" 5 | "time" 6 | ) 7 | 8 | // Token holds tokens typically used for user activation and password resets 9 | type Token struct { 10 | gorm.Model 11 | Value string 12 | Type string 13 | ModelID int 14 | ModelType string 15 | ExpiresAt time.Time 16 | } 17 | 18 | // HasExpired is a helper function that checks if the current time is after the token expiration time 19 | func (t Token) HasExpired() bool { 20 | return t.ExpiresAt.Before(time.Now()) 21 | } 22 | 23 | const ( 24 | // TokenUserActivation is a constant used to identify tokens used for user activation 25 | TokenUserActivation string = "user_activation" 26 | // TokenPasswordReset is a constant used to identify tokens used for password resets 27 | TokenPasswordReset string = "password_reset" 28 | ) 29 | -------------------------------------------------------------------------------- /models/user.go: -------------------------------------------------------------------------------- 1 | // Package models defines all the database models for the application 2 | package models 3 | 4 | import ( 5 | "gorm.io/gorm" 6 | "time" 7 | ) 8 | 9 | // User holds information relating to users that use the application 10 | type User struct { 11 | gorm.Model 12 | Email string 13 | Password string 14 | ActivatedAt *time.Time 15 | Tokens []Token `gorm:"polymorphic:Model;"` 16 | Sessions []Session 17 | } 18 | -------------------------------------------------------------------------------- /models/website.go: -------------------------------------------------------------------------------- 1 | package models 2 | 3 | import "gorm.io/gorm" 4 | 5 | // Website holds information about different websites 6 | type Website struct { 7 | gorm.Model 8 | Title string 9 | Description string 10 | URL string 11 | } 12 | -------------------------------------------------------------------------------- /routes/index.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "net/http" 6 | ) 7 | 8 | // Index renders the HTML of the index page 9 | func (controller Controller) Index(c *gin.Context) { 10 | pd := controller.DefaultPageData(c) 11 | pd.Title = pd.Trans("Home") 12 | c.HTML(http.StatusOK, "index.html", pd) 13 | } 14 | -------------------------------------------------------------------------------- /routes/logout.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-contrib/sessions" 5 | "github.com/gin-gonic/gin" 6 | "github.com/uberswe/golang-base-project/middleware" 7 | "log" 8 | "net/http" 9 | ) 10 | 11 | // Logout deletes the current user session and redirects the user to the index page 12 | func (controller Controller) Logout(c *gin.Context) { 13 | session := sessions.Default(c) 14 | session.Delete(middleware.SessionIDKey) 15 | err := session.Save() 16 | if err != nil { 17 | log.Println(err) 18 | } 19 | 20 | c.Redirect(http.StatusTemporaryRedirect, "/") 21 | } 22 | -------------------------------------------------------------------------------- /routes/noroute.go: -------------------------------------------------------------------------------- 1 | package routes 2 | 3 | import ( 4 | "github.com/gin-gonic/gin" 5 | "net/http" 6 | ) 7 | 8 | // NoRoute handles rendering of the 404 page 9 | func (controller Controller) NoRoute(c *gin.Context) { 10 | pd := controller.DefaultPageData(c) 11 | pd.Title = pd.Trans("404 Not Found") 12 | c.HTML(http.StatusOK, "404.html", pd) 13 | } 14 | -------------------------------------------------------------------------------- /src/index.js: -------------------------------------------------------------------------------- 1 | // Collapse is needed for responsive navbar 2 | import 'bootstrap/js/src/base-component' 3 | import 'bootstrap/js/src/collapse' 4 | import 'bootstrap/js/src/alert' -------------------------------------------------------------------------------- /src/style.scss: -------------------------------------------------------------------------------- 1 | @import "custom"; 2 | @import "~bootstrap/scss/bootstrap"; -------------------------------------------------------------------------------- /staticcheck.conf: -------------------------------------------------------------------------------- 1 | checks = ["all"] 2 | initialisms = ["ACL", "API", "ASCII", "CPU", "CSS", "DNS", 3 | "EOF", "GUID", "HTML", "HTTP", "HTTPS", "ID", 4 | "IP", "JSON", "QPS", "RAM", "RPC", "SLA", 5 | "SMTP", "SQL", "SSH", "TCP", "TLS", "TTL", 6 | "UDP", "UI", "GID", "UID", "UUID", "URI", 7 | "URL", "UTF8", "VM", "XML", "XMPP", "XSRF", 8 | "XSS", "SIP", "RTP", "AMQP", "DB", "TS"] 9 | dot_import_whitelist = [] 10 | http_status_code_whitelist = [] -------------------------------------------------------------------------------- /text/html.go: -------------------------------------------------------------------------------- 1 | package text 2 | 3 | import ( 4 | "fmt" 5 | "net/url" 6 | "strings" 7 | ) 8 | 9 | // Nl2Br converts \n to HTML
tags 10 | func Nl2Br(s string) string { 11 | return strings.Replace(s, "\n", "
", -1) 12 | } 13 | 14 | // LinkToHTMLLink converts regular links to HTML links 15 | func LinkToHTMLLink(s string) string { 16 | s = strings.Replace(s, "\n", " \n ", -1) 17 | for _, p := range strings.Split(s, " ") { 18 | u, err := url.ParseRequestURI(p) 19 | if err == nil && u.Scheme != "" { 20 | s = strings.Replace(s, p, fmt.Sprintf("%s", p, p), 1) 21 | } 22 | } 23 | return strings.Replace(s, " \n ", "\n", -1) 24 | } 25 | -------------------------------------------------------------------------------- /text/random.go: -------------------------------------------------------------------------------- 1 | package text 2 | 3 | import "math/rand" 4 | 5 | // RandomString generates a random string of n length. Based on https://stackoverflow.com/a/22892986/1260548 6 | func RandomString(n int) string { 7 | // remove vowels to make it less likely to generate something offensive 8 | var letters = []rune("bcdfghjklmnpqrstvwxzBCDFGHJKLMNPQRSTVWXZ") 9 | 10 | b := make([]rune, n) 11 | for i := range b { 12 | b[i] = letters[rand.Intn(len(letters))] 13 | } 14 | return string(b) 15 | } 16 | -------------------------------------------------------------------------------- /text/segment.go: -------------------------------------------------------------------------------- 1 | package text 2 | 3 | import "strings" 4 | 5 | // BetweenStrings returns a string between the starting and ending string or an empty string if none could be found 6 | func BetweenStrings(str string, start string, end string) (result string) { 7 | s := strings.Index(str, start) 8 | if s == -1 { 9 | return 10 | } 11 | s += len(start) 12 | e := strings.Index(str[s:], end) 13 | if e == -1 { 14 | return 15 | } 16 | return str[s : s+e] 17 | } 18 | -------------------------------------------------------------------------------- /ulid/generate.go: -------------------------------------------------------------------------------- 1 | package ulid 2 | 3 | import ( 4 | "github.com/oklog/ulid/v2" 5 | "math/rand" 6 | "time" 7 | ) 8 | 9 | // Generate a new ULID string 10 | func Generate() string { 11 | entropy := ulid.Monotonic(rand.New(rand.NewSource(time.Now().UnixNano())), 0) 12 | res := ulid.MustNew(ulid.Timestamp(time.Now()), entropy) 13 | return res.String() 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.gitignore: -------------------------------------------------------------------------------- 1 | TAGS 2 | tags 3 | .*.swp 4 | tomlcheck/tomlcheck 5 | toml.test 6 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.1 4 | - 1.2 5 | - 1.3 6 | - 1.4 7 | - 1.5 8 | - 1.6 9 | - tip 10 | install: 11 | - go install ./... 12 | - go get github.com/BurntSushi/toml-test 13 | script: 14 | - export PATH="$PATH:$HOME/gopath/bin" 15 | - make test 16 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/COMPATIBLE: -------------------------------------------------------------------------------- 1 | Compatible with TOML version 2 | [v0.4.0](https://github.com/toml-lang/toml/blob/v0.4.0/versions/en/toml-v0.4.0.md) 3 | 4 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/Makefile: -------------------------------------------------------------------------------- 1 | install: 2 | go install ./... 3 | 4 | test: install 5 | go test -v 6 | toml-test toml-test-decoder 7 | toml-test -encoder toml-test-encoder 8 | 9 | fmt: 10 | gofmt -w *.go */*.go 11 | colcheck *.go */*.go 12 | 13 | tags: 14 | find ./ -name '*.go' -print0 | xargs -0 gotags > TAGS 15 | 16 | push: 17 | git push origin master 18 | git push github master 19 | 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/encoding_types.go: -------------------------------------------------------------------------------- 1 | // +build go1.2 2 | 3 | package toml 4 | 5 | // In order to support Go 1.1, we define our own TextMarshaler and 6 | // TextUnmarshaler types. For Go 1.2+, we just alias them with the 7 | // standard library interfaces. 8 | 9 | import ( 10 | "encoding" 11 | ) 12 | 13 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 14 | // so that Go 1.1 can be supported. 15 | type TextMarshaler encoding.TextMarshaler 16 | 17 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 18 | // here so that Go 1.1 can be supported. 19 | type TextUnmarshaler encoding.TextUnmarshaler 20 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/encoding_types_1.1.go: -------------------------------------------------------------------------------- 1 | // +build !go1.2 2 | 3 | package toml 4 | 5 | // These interfaces were introduced in Go 1.2, so we add them manually when 6 | // compiling for Go 1.1. 7 | 8 | // TextMarshaler is a synonym for encoding.TextMarshaler. It is defined here 9 | // so that Go 1.1 can be supported. 10 | type TextMarshaler interface { 11 | MarshalText() (text []byte, err error) 12 | } 13 | 14 | // TextUnmarshaler is a synonym for encoding.TextUnmarshaler. It is defined 15 | // here so that Go 1.1 can be supported. 16 | type TextUnmarshaler interface { 17 | UnmarshalText(text []byte) error 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/BurntSushi/toml/session.vim: -------------------------------------------------------------------------------- 1 | au BufWritePost *.go silent!make tags > /dev/null 2>&1 2 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sessions/.gitignore: -------------------------------------------------------------------------------- 1 | coverage.out 2 | vendor/* 3 | !/vendor/vendor.json 4 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sessions/session_options_go1.10.go: -------------------------------------------------------------------------------- 1 | // +build !go1.11 2 | 3 | package sessions 4 | 5 | import ( 6 | gsessions "github.com/gorilla/sessions" 7 | ) 8 | 9 | // Options stores configuration for a session or session store. 10 | // Fields are a subset of http.Cookie fields. 11 | type Options struct { 12 | Path string 13 | Domain string 14 | // MaxAge=0 means no 'Max-Age' attribute specified. 15 | // MaxAge<0 means delete cookie now, equivalently 'Max-Age: 0'. 16 | // MaxAge>0 means Max-Age attribute present and given in seconds. 17 | MaxAge int 18 | Secure bool 19 | HttpOnly bool 20 | } 21 | 22 | func (options Options) ToGorillaOptions() *gsessions.Options { 23 | return &gsessions.Options{ 24 | Path: options.Path, 25 | Domain: options.Domain, 26 | MaxAge: options.MaxAge, 27 | Secure: options.Secure, 28 | HttpOnly: options.HttpOnly, 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sse/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.8.x 5 | - 1.9.x 6 | - 1.10.x 7 | - 1.11.x 8 | - 1.12.x 9 | - master 10 | 11 | git: 12 | depth: 10 13 | 14 | matrix: 15 | fast_finish: true 16 | include: 17 | - go: 1.11.x 18 | env: GO111MODULE=on 19 | - go: 1.12.x 20 | env: GO111MODULE=on 21 | 22 | script: 23 | - go test -v -covermode=count -coverprofile=coverage.out 24 | 25 | after_success: 26 | - bash <(curl -s https://codecov.io/bash) 27 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sse/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gin-contrib/sse 2 | 3 | go 1.12 4 | 5 | require github.com/stretchr/testify v1.3.0 6 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sse/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 6 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 7 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 8 | -------------------------------------------------------------------------------- /vendor/github.com/gin-contrib/sse/writer.go: -------------------------------------------------------------------------------- 1 | package sse 2 | 3 | import "io" 4 | 5 | type stringWriter interface { 6 | io.Writer 7 | WriteString(string) (int, error) 8 | } 9 | 10 | type stringWrapper struct { 11 | io.Writer 12 | } 13 | 14 | func (w stringWrapper) WriteString(str string) (int, error) { 15 | return w.Writer.Write([]byte(str)) 16 | } 17 | 18 | func checkWriter(writer io.Writer) stringWriter { 19 | if w, ok := writer.(stringWriter); ok { 20 | return w 21 | } else { 22 | return stringWrapper{writer} 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/.gitignore: -------------------------------------------------------------------------------- 1 | vendor/* 2 | !vendor/vendor.json 3 | coverage.out 4 | count.out 5 | test 6 | profile.out 7 | tmp.out 8 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | ## Contributing 2 | 3 | - With issues: 4 | - Use the search tool before opening a new issue. 5 | - Please provide source code and commit sha if you found a bug. 6 | - Review existing issues and provide feedback or react to them. 7 | 8 | - With pull requests: 9 | - Open your pull request against `master` 10 | - Your pull request should have no more than two commits, if not you should squash them. 11 | - It should pass all tests in the available continuous integration systems such as TravisCI. 12 | - You should add/modify tests to cover your proposed code changes. 13 | - If your pull request contains a new feature, please document it on the README. 14 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/header.go: -------------------------------------------------------------------------------- 1 | package binding 2 | 3 | import ( 4 | "net/http" 5 | "net/textproto" 6 | "reflect" 7 | ) 8 | 9 | type headerBinding struct{} 10 | 11 | func (headerBinding) Name() string { 12 | return "header" 13 | } 14 | 15 | func (headerBinding) Bind(req *http.Request, obj interface{}) error { 16 | 17 | if err := mapHeader(obj, req.Header); err != nil { 18 | return err 19 | } 20 | 21 | return validate(obj) 22 | } 23 | 24 | func mapHeader(ptr interface{}, h map[string][]string) error { 25 | return mappingByPtr(ptr, headerSource(h), "header") 26 | } 27 | 28 | type headerSource map[string][]string 29 | 30 | var _ setter = headerSource(nil) 31 | 32 | func (hs headerSource) TrySet(value reflect.Value, field reflect.StructField, tagValue string, opt setOptions) (isSetted bool, err error) { 33 | return setByForm(value, field, hs, textproto.CanonicalMIMEHeaderKey(tagValue), opt) 34 | } 35 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/query.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | import "net/http" 8 | 9 | type queryBinding struct{} 10 | 11 | func (queryBinding) Name() string { 12 | return "query" 13 | } 14 | 15 | func (queryBinding) Bind(req *http.Request, obj interface{}) error { 16 | values := req.URL.Query() 17 | if err := mapForm(obj, values); err != nil { 18 | return err 19 | } 20 | return validate(obj) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/uri.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Gin Core Team. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | type uriBinding struct{} 8 | 9 | func (uriBinding) Name() string { 10 | return "uri" 11 | } 12 | 13 | func (uriBinding) BindUri(m map[string][]string, obj interface{}) error { 14 | if err := mapUri(obj, m); err != nil { 15 | return err 16 | } 17 | return validate(obj) 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/xml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | import ( 8 | "bytes" 9 | "encoding/xml" 10 | "io" 11 | "net/http" 12 | ) 13 | 14 | type xmlBinding struct{} 15 | 16 | func (xmlBinding) Name() string { 17 | return "xml" 18 | } 19 | 20 | func (xmlBinding) Bind(req *http.Request, obj interface{}) error { 21 | return decodeXML(req.Body, obj) 22 | } 23 | 24 | func (xmlBinding) BindBody(body []byte, obj interface{}) error { 25 | return decodeXML(bytes.NewReader(body), obj) 26 | } 27 | func decodeXML(r io.Reader, obj interface{}) error { 28 | decoder := xml.NewDecoder(r) 29 | if err := decoder.Decode(obj); err != nil { 30 | return err 31 | } 32 | return validate(obj) 33 | } 34 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/binding/yaml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Gin Core Team. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package binding 6 | 7 | import ( 8 | "bytes" 9 | "io" 10 | "net/http" 11 | 12 | "gopkg.in/yaml.v2" 13 | ) 14 | 15 | type yamlBinding struct{} 16 | 17 | func (yamlBinding) Name() string { 18 | return "yaml" 19 | } 20 | 21 | func (yamlBinding) Bind(req *http.Request, obj interface{}) error { 22 | return decodeYAML(req.Body, obj) 23 | } 24 | 25 | func (yamlBinding) BindBody(body []byte, obj interface{}) error { 26 | return decodeYAML(bytes.NewReader(body), obj) 27 | } 28 | 29 | func decodeYAML(r io.Reader, obj interface{}) error { 30 | decoder := yaml.NewDecoder(r) 31 | if err := decoder.Decode(obj); err != nil { 32 | return err 33 | } 34 | return validate(obj) 35 | } 36 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | notify: 3 | gitter: 4 | default: 5 | url: https://webhooks.gitter.im/e/d90dcdeeab2f1e357165 6 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/context_appengine.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build appengine 6 | // +build appengine 7 | 8 | package gin 9 | 10 | func init() { 11 | defaultPlatform = PlatformGoogleAppEngine 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/deprecated.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gin 6 | 7 | import ( 8 | "log" 9 | 10 | "github.com/gin-gonic/gin/binding" 11 | ) 12 | 13 | // BindWith binds the passed struct pointer using the specified binding engine. 14 | // See the binding package. 15 | func (c *Context) BindWith(obj interface{}, b binding.Binding) error { 16 | log.Println(`BindWith(\"interface{}, binding.Binding\") error is going to 17 | be deprecated, please check issue #662 and either use MustBindWith() if you 18 | want HTTP 400 to be automatically returned if any error occur, or use 19 | ShouldBindWith() if you need to manage the error.`) 20 | return c.MustBindWith(obj, b) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/doc.go: -------------------------------------------------------------------------------- 1 | /* 2 | Package gin implements a HTTP web framework called gin. 3 | 4 | See https://gin-gonic.com/ for more information about gin. 5 | */ 6 | package gin // import "github.com/gin-gonic/gin" 7 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gin-gonic/gin 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/gin-contrib/sse v0.1.0 7 | github.com/go-playground/validator/v10 v10.4.1 8 | github.com/golang/protobuf v1.3.3 9 | github.com/json-iterator/go v1.1.9 10 | github.com/mattn/go-isatty v0.0.12 11 | github.com/stretchr/testify v1.4.0 12 | github.com/ugorji/go/codec v1.1.7 13 | gopkg.in/yaml.v2 v2.2.8 14 | ) 15 | 16 | retract v1.7.5 17 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/internal/bytesconv/bytesconv.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 Gin Core Team. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package bytesconv 6 | 7 | import ( 8 | "unsafe" 9 | ) 10 | 11 | // StringToBytes converts string to byte slice without a memory allocation. 12 | func StringToBytes(s string) []byte { 13 | return *(*[]byte)(unsafe.Pointer( 14 | &struct { 15 | string 16 | Cap int 17 | }{s, len(s)}, 18 | )) 19 | } 20 | 21 | // BytesToString converts byte slice to string without a memory allocation. 22 | func BytesToString(b []byte) string { 23 | return *(*string)(unsafe.Pointer(&b)) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/internal/json/json.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Bo-Yi Wu. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !jsoniter 6 | // +build !jsoniter 7 | 8 | package json 9 | 10 | import "encoding/json" 11 | 12 | var ( 13 | // Marshal is exported by gin/json package. 14 | Marshal = json.Marshal 15 | // Unmarshal is exported by gin/json package. 16 | Unmarshal = json.Unmarshal 17 | // MarshalIndent is exported by gin/json package. 18 | MarshalIndent = json.MarshalIndent 19 | // NewDecoder is exported by gin/json package. 20 | NewDecoder = json.NewDecoder 21 | // NewEncoder is exported by gin/json package. 22 | NewEncoder = json.NewEncoder 23 | ) 24 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/internal/json/jsoniter.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Bo-Yi Wu. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build jsoniter 6 | // +build jsoniter 7 | 8 | package json 9 | 10 | import jsoniter "github.com/json-iterator/go" 11 | 12 | var ( 13 | json = jsoniter.ConfigCompatibleWithStandardLibrary 14 | // Marshal is exported by gin/json package. 15 | Marshal = json.Marshal 16 | // Unmarshal is exported by gin/json package. 17 | Unmarshal = json.Unmarshal 18 | // MarshalIndent is exported by gin/json package. 19 | MarshalIndent = json.MarshalIndent 20 | // NewDecoder is exported by gin/json package. 21 | NewDecoder = json.NewDecoder 22 | // NewEncoder is exported by gin/json package. 23 | NewEncoder = json.NewEncoder 24 | ) 25 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/data.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import "net/http" 8 | 9 | // Data contains ContentType and bytes data. 10 | type Data struct { 11 | ContentType string 12 | Data []byte 13 | } 14 | 15 | // Render (Data) writes data with custom ContentType. 16 | func (r Data) Render(w http.ResponseWriter) (err error) { 17 | r.WriteContentType(w) 18 | _, err = w.Write(r.Data) 19 | return 20 | } 21 | 22 | // WriteContentType (Data) writes custom ContentType. 23 | func (r Data) WriteContentType(w http.ResponseWriter) { 24 | writeContentType(w, []string{r.ContentType}) 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/render/xml.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package render 6 | 7 | import ( 8 | "encoding/xml" 9 | "net/http" 10 | ) 11 | 12 | // XML contains the given interface object. 13 | type XML struct { 14 | Data interface{} 15 | } 16 | 17 | var xmlContentType = []string{"application/xml; charset=utf-8"} 18 | 19 | // Render (XML) encodes the given interface object and writes data with custom ContentType. 20 | func (r XML) Render(w http.ResponseWriter) error { 21 | r.WriteContentType(w) 22 | return xml.NewEncoder(w).Encode(r.Data) 23 | } 24 | 25 | // WriteContentType (XML) writes XML ContentType for response. 26 | func (r XML) WriteContentType(w http.ResponseWriter) { 27 | writeContentType(w, xmlContentType) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/test_helpers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 Manu Martinez-Almeida. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gin 6 | 7 | import "net/http" 8 | 9 | // CreateTestContext returns a fresh engine and context for testing purposes 10 | func CreateTestContext(w http.ResponseWriter) (c *Context, r *Engine) { 11 | r = New() 12 | c = r.allocateContext() 13 | c.reset() 14 | c.writermem.reset(w) 15 | return 16 | } 17 | -------------------------------------------------------------------------------- /vendor/github.com/gin-gonic/gin/version.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 Gin Core Team. All rights reserved. 2 | // Use of this source code is governed by a MIT style 3 | // license that can be found in the LICENSE file. 4 | 5 | package gin 6 | 7 | // Version is the current gin framework's version. 8 | const Version = "v1.7.7" 9 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.13.1 4 | - tip 5 | matrix: 6 | allow_failures: 7 | - go: tip 8 | 9 | notifications: 10 | email: 11 | recipients: dean.karn@gmail.com 12 | on_success: change 13 | on_failure: always 14 | 15 | before_install: 16 | - go install github.com/mattn/goveralls 17 | 18 | # Only clone the most recent commit. 19 | git: 20 | depth: 1 21 | 22 | script: 23 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... 24 | 25 | after_success: | 26 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-playground/locales 2 | 3 | go 1.13 4 | 5 | require golang.org/x/text v0.3.2 6 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/text v0.3.2 h1:tW2bmiBqwgJj/UpqtC8EpXEZVYOwU0yG4iWbprSVAcs= 2 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 3 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 4 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/locales/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/go-playground/locales/logo.png -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | *.coverprofile -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.13.4 4 | - tip 5 | matrix: 6 | allow_failures: 7 | - go: tip 8 | 9 | notifications: 10 | email: 11 | recipients: dean.karn@gmail.com 12 | on_success: change 13 | on_failure: always 14 | 15 | before_install: 16 | - go install github.com/mattn/goveralls 17 | 18 | # Only clone the most recent commit. 19 | git: 20 | depth: 1 21 | 22 | script: 23 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... 24 | 25 | after_success: | 26 | [ $TRAVIS_GO_VERSION = 1.13.4 ] && 27 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-playground/universal-translator 2 | 3 | go 1.13 4 | 5 | require github.com/go-playground/locales v0.13.0 6 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/go.sum: -------------------------------------------------------------------------------- 1 | github.com/go-playground/locales v0.13.0 h1:HyWk6mgj5qFqCT5fjGBuRArbVDfE4hi8+e8ceBS/t7Q= 2 | github.com/go-playground/locales v0.13.0/go.mod h1:taPMhCMXrRLJO55olJkUXHZBHCxTMfnGwq/HNwmWNS8= 3 | golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= 4 | golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= 5 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/universal-translator/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/go-playground/universal-translator/logo.png -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | bin 10 | 11 | # Architecture specific extensions/prefixes 12 | *.[568vq] 13 | [568vq].out 14 | 15 | *.cgo1.go 16 | *.cgo2.c 17 | _cgo_defun.c 18 | _cgo_gotypes.go 19 | _cgo_export.* 20 | 21 | _testmain.go 22 | 23 | *.exe 24 | *.test 25 | *.prof 26 | *.test 27 | *.out 28 | *.txt 29 | cover.html 30 | README.html 31 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go: 3 | - 1.15.2 4 | - tip 5 | matrix: 6 | allow_failures: 7 | - go: tip 8 | 9 | notifications: 10 | email: 11 | recipients: dean.karn@gmail.com 12 | on_success: change 13 | on_failure: always 14 | 15 | before_install: 16 | - go install github.com/mattn/goveralls 17 | - mkdir -p $GOPATH/src/gopkg.in 18 | - ln -s $GOPATH/src/github.com/$TRAVIS_REPO_SLUG $GOPATH/src/gopkg.in/validator.v9 19 | 20 | # Only clone the most recent commit. 21 | git: 22 | depth: 1 23 | 24 | script: 25 | - go test -v -race -covermode=atomic -coverprofile=coverage.coverprofile ./... 26 | 27 | after_success: | 28 | [ $TRAVIS_GO_VERSION = 1.15.2 ] && 29 | goveralls -coverprofile=coverage.coverprofile -service travis-ci -repotoken $COVERALLS_TOKEN 30 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/Makefile: -------------------------------------------------------------------------------- 1 | GOCMD=GO111MODULE=on go 2 | 3 | linters-install: 4 | @golangci-lint --version >/dev/null 2>&1 || { \ 5 | echo "installing linting tools..."; \ 6 | curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s v1.21.0; \ 7 | } 8 | 9 | lint: linters-install 10 | $(PWD)/bin/golangci-lint run 11 | 12 | test: 13 | $(GOCMD) test -cover -race ./... 14 | 15 | bench: 16 | $(GOCMD) test -bench=. -benchmem ./... 17 | 18 | .PHONY: test lint linters-install -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-playground/validator/v10 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/go-playground/assert/v2 v2.0.1 7 | github.com/go-playground/locales v0.13.0 8 | github.com/go-playground/universal-translator v0.17.0 9 | github.com/leodido/go-urn v1.2.0 10 | golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/go-playground/validator/v10/logo.png -------------------------------------------------------------------------------- /vendor/github.com/go-playground/validator/v10/translations.go: -------------------------------------------------------------------------------- 1 | package validator 2 | 3 | import ut "github.com/go-playground/universal-translator" 4 | 5 | // TranslationFunc is the function type used to register or override 6 | // custom translations 7 | type TranslationFunc func(ut ut.Translator, fe FieldError) string 8 | 9 | // RegisterTranslationsFunc allows for registering of translations 10 | // for a 'ut.Translator' for use within the 'TranslationFunc' 11 | type RegisterTranslationsFunc func(ut ut.Translator) error 12 | -------------------------------------------------------------------------------- /vendor/github.com/go-sql-driver/mysql/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | .DS_Store? 3 | ._* 4 | .Spotlight-V100 5 | .Trashes 6 | Icon? 7 | ehthumbs.db 8 | Thumbs.db 9 | .idea 10 | -------------------------------------------------------------------------------- /vendor/github.com/go-sql-driver/mysql/conncheck_dummy.go: -------------------------------------------------------------------------------- 1 | // Go MySQL Driver - A MySQL-Driver for Go's database/sql package 2 | // 3 | // Copyright 2019 The Go-MySQL-Driver Authors. All rights reserved. 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public 6 | // License, v. 2.0. If a copy of the MPL was not distributed with this file, 7 | // You can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | // +build !linux,!darwin,!dragonfly,!freebsd,!netbsd,!openbsd,!solaris,!illumos 10 | 11 | package mysql 12 | 13 | import "net" 14 | 15 | func connCheck(conn net.Conn) error { 16 | return nil 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/go-sql-driver/mysql/fuzz.go: -------------------------------------------------------------------------------- 1 | // Go MySQL Driver - A MySQL-Driver for Go's database/sql package. 2 | // 3 | // Copyright 2020 The Go-MySQL-Driver Authors. All rights reserved. 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public 6 | // License, v. 2.0. If a copy of the MPL was not distributed with this file, 7 | // You can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | // +build gofuzz 10 | 11 | package mysql 12 | 13 | import ( 14 | "database/sql" 15 | ) 16 | 17 | func Fuzz(data []byte) int { 18 | db, err := sql.Open("mysql", string(data)) 19 | if err != nil { 20 | return 0 21 | } 22 | db.Close() 23 | return 1 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/go-sql-driver/mysql/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/go-sql-driver/mysql 2 | 3 | go 1.10 4 | -------------------------------------------------------------------------------- /vendor/github.com/go-sql-driver/mysql/result.go: -------------------------------------------------------------------------------- 1 | // Go MySQL Driver - A MySQL-Driver for Go's database/sql package 2 | // 3 | // Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved. 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public 6 | // License, v. 2.0. If a copy of the MPL was not distributed with this file, 7 | // You can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | package mysql 10 | 11 | type mysqlResult struct { 12 | affectedRows int64 13 | insertId int64 14 | } 15 | 16 | func (res *mysqlResult) LastInsertId() (int64, error) { 17 | return res.insertId, nil 18 | } 19 | 20 | func (res *mysqlResult) RowsAffected() (int64, error) { 21 | return res.affectedRows, nil 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/go-sql-driver/mysql/transaction.go: -------------------------------------------------------------------------------- 1 | // Go MySQL Driver - A MySQL-Driver for Go's database/sql package 2 | // 3 | // Copyright 2012 The Go-MySQL-Driver Authors. All rights reserved. 4 | // 5 | // This Source Code Form is subject to the terms of the Mozilla Public 6 | // License, v. 2.0. If a copy of the MPL was not distributed with this file, 7 | // You can obtain one at http://mozilla.org/MPL/2.0/. 8 | 9 | package mysql 10 | 11 | type mysqlTx struct { 12 | mc *mysqlConn 13 | } 14 | 15 | func (tx *mysqlTx) Commit() (err error) { 16 | if tx.mc == nil || tx.mc.closed.IsSet() { 17 | return ErrInvalidConn 18 | } 19 | err = tx.mc.exec("COMMIT") 20 | tx.mc = nil 21 | return 22 | } 23 | 24 | func (tx *mysqlTx) Rollback() (err error) { 25 | if tx.mc == nil || tx.mc.closed.IsSet() { 26 | return ErrInvalidConn 27 | } 28 | err = tx.mc.exec("ROLLBACK") 29 | tx.mc = nil 30 | return 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/golang/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/context/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.3 7 | - go: 1.4 8 | - go: 1.5 9 | - go: 1.6 10 | - go: 1.7 11 | - go: tip 12 | allow_failures: 13 | - go: tip 14 | 15 | script: 16 | - go get -t -v ./... 17 | - diff -u <(echo -n) <(gofmt -d .) 18 | - go vet $(go list ./... | grep -v /vendor/) 19 | - go test -v -race ./... 20 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/context/README.md: -------------------------------------------------------------------------------- 1 | context 2 | ======= 3 | [![Build Status](https://travis-ci.org/gorilla/context.png?branch=master)](https://travis-ci.org/gorilla/context) 4 | 5 | gorilla/context is a general purpose registry for global request variables. 6 | 7 | > Note: gorilla/context, having been born well before `context.Context` existed, does not play well 8 | > with the shallow copying of the request that [`http.Request.WithContext`](https://golang.org/pkg/net/http/#Request.WithContext) (added to net/http Go 1.7 onwards) performs. You should either use *just* gorilla/context, or moving forward, the new `http.Request.Context()`. 9 | 10 | Read the full documentation here: http://www.gorillatoolkit.org/pkg/context 11 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/securecookie/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | 4 | matrix: 5 | include: 6 | - go: 1.3 7 | - go: 1.4 8 | - go: 1.5 9 | - go: 1.6 10 | - go: 1.7 11 | - go: tip 12 | allow_failures: 13 | - go: tip 14 | 15 | script: 16 | - go get -t -v ./... 17 | - diff -u <(echo -n) <(gofmt -d .) 18 | - go vet $(go list ./... | grep -v /vendor/) 19 | - go test -v -race ./... 20 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/securecookie/fuzz.go: -------------------------------------------------------------------------------- 1 | // +build gofuzz 2 | 3 | package securecookie 4 | 5 | var hashKey = []byte("very-secret12345") 6 | var blockKey = []byte("a-lot-secret1234") 7 | var s = New(hashKey, blockKey) 8 | 9 | type Cookie struct { 10 | B bool 11 | I int 12 | S string 13 | } 14 | 15 | func Fuzz(data []byte) int { 16 | datas := string(data) 17 | var c Cookie 18 | if err := s.Decode("fuzz", datas, &c); err != nil { 19 | return 0 20 | } 21 | if _, err := s.Encode("fuzz", c); err != nil { 22 | panic(err) 23 | } 24 | return 1 25 | } 26 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/sessions/cookie.go: -------------------------------------------------------------------------------- 1 | // +build !go1.11 2 | 3 | package sessions 4 | 5 | import "net/http" 6 | 7 | // newCookieFromOptions returns an http.Cookie with the options set. 8 | func newCookieFromOptions(name, value string, options *Options) *http.Cookie { 9 | return &http.Cookie{ 10 | Name: name, 11 | Value: value, 12 | Path: options.Path, 13 | Domain: options.Domain, 14 | MaxAge: options.MaxAge, 15 | Secure: options.Secure, 16 | HttpOnly: options.HttpOnly, 17 | } 18 | 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/sessions/cookie_go111.go: -------------------------------------------------------------------------------- 1 | // +build go1.11 2 | 3 | package sessions 4 | 5 | import "net/http" 6 | 7 | // newCookieFromOptions returns an http.Cookie with the options set. 8 | func newCookieFromOptions(name, value string, options *Options) *http.Cookie { 9 | return &http.Cookie{ 10 | Name: name, 11 | Value: value, 12 | Path: options.Path, 13 | Domain: options.Domain, 14 | MaxAge: options.MaxAge, 15 | Secure: options.Secure, 16 | HttpOnly: options.HttpOnly, 17 | SameSite: options.SameSite, 18 | } 19 | 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/sessions/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/gorilla/sessions 2 | 3 | require github.com/gorilla/securecookie v1.1.1 4 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/sessions/go.sum: -------------------------------------------------------------------------------- 1 | github.com/gorilla/securecookie v1.1.1 h1:miw7JPhV+b/lAHSXz4qd/nN9jRiAFV5FwjeKyCS8BvQ= 2 | github.com/gorilla/securecookie v1.1.1/go.mod h1:ra0sb63/xPlUeL+yeDciTfxMRAA+MP+HVt/4epWDjd4= 3 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/sessions/options.go: -------------------------------------------------------------------------------- 1 | // +build !go1.11 2 | 3 | package sessions 4 | 5 | // Options stores configuration for a session or session store. 6 | // 7 | // Fields are a subset of http.Cookie fields. 8 | type Options struct { 9 | Path string 10 | Domain string 11 | // MaxAge=0 means no Max-Age attribute specified and the cookie will be 12 | // deleted after the browser session ends. 13 | // MaxAge<0 means delete cookie immediately. 14 | // MaxAge>0 means Max-Age attribute present and given in seconds. 15 | MaxAge int 16 | Secure bool 17 | HttpOnly bool 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/gorilla/sessions/options_go111.go: -------------------------------------------------------------------------------- 1 | // +build go1.11 2 | 3 | package sessions 4 | 5 | import "net/http" 6 | 7 | // Options stores configuration for a session or session store. 8 | // 9 | // Fields are a subset of http.Cookie fields. 10 | type Options struct { 11 | Path string 12 | Domain string 13 | // MaxAge=0 means no Max-Age attribute specified and the cookie will be 14 | // deleted after the browser session ends. 15 | // MaxAge<0 means delete cookie immediately. 16 | // MaxAge>0 means Max-Age attribute present and given in seconds. 17 | MaxAge int 18 | Secure bool 19 | HttpOnly bool 20 | // Defaults to http.SameSiteDefaultMode 21 | SameSite http.SameSite 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/chunkreader/v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | matrix: 8 | allow_failures: 9 | - go: tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/chunkreader/v2/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/chunkreader?status.svg)](https://godoc.org/github.com/jackc/chunkreader) 2 | [![Build Status](https://travis-ci.org/jackc/chunkreader.svg)](https://travis-ci.org/jackc/chunkreader) 3 | 4 | # chunkreader 5 | 6 | Package chunkreader provides an io.Reader wrapper that minimizes IO reads and memory allocations. 7 | 8 | Extracted from original implementation in https://github.com/jackc/pgx. 9 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/chunkreader/v2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/chunkreader/v2 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgconn/.gitignore: -------------------------------------------------------------------------------- 1 | .envrc 2 | vendor/ 3 | .vscode 4 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgconn/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgconn 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/jackc/chunkreader/v2 v2.0.1 7 | github.com/jackc/pgio v1.0.0 8 | github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 9 | github.com/jackc/pgpassfile v1.0.0 10 | github.com/jackc/pgproto3/v2 v2.1.1 11 | github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b 12 | github.com/stretchr/testify v1.7.0 13 | golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97 14 | golang.org/x/text v0.3.6 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgio/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | matrix: 8 | allow_failures: 9 | - go: tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgio/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/pgio?status.svg)](https://godoc.org/github.com/jackc/pgio) 2 | [![Build Status](https://travis-ci.org/jackc/pgio.svg)](https://travis-ci.org/jackc/pgio) 3 | 4 | # pgio 5 | 6 | Package pgio is a low-level toolkit building messages in the PostgreSQL wire protocol. 7 | 8 | pgio provides functions for appending integers to a []byte while doing byte 9 | order conversion. 10 | 11 | Extracted from original implementation in https://github.com/jackc/pgx. 12 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgio/doc.go: -------------------------------------------------------------------------------- 1 | // Package pgio is a low-level toolkit building messages in the PostgreSQL wire protocol. 2 | /* 3 | pgio provides functions for appending integers to a []byte while doing byte 4 | order conversion. 5 | */ 6 | package pgio 7 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgio/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgio 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgpassfile/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | matrix: 8 | allow_failures: 9 | - go: tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgpassfile/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/pgpassfile?status.svg)](https://godoc.org/github.com/jackc/pgpassfile) 2 | [![Build Status](https://travis-ci.org/jackc/pgpassfile.svg)](https://travis-ci.org/jackc/pgpassfile) 3 | 4 | # pgpassfile 5 | 6 | Package pgpassfile is a parser PostgreSQL .pgpass files. 7 | 8 | Extracted and rewritten from original implementation in https://github.com/jackc/pgx. 9 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgpassfile/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgpassfile 2 | 3 | go 1.12 4 | 5 | require github.com/stretchr/testify v1.3.0 6 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgpassfile/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 6 | github.com/stretchr/testify v1.3.0 h1:TivCn/peBQ7UY8ooIcPgZFpTNSz0Q2U6UrFlUfqbe0Q= 7 | github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI= 8 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | matrix: 8 | allow_failures: 9 | - go: tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/pgproto3?status.svg)](https://godoc.org/github.com/jackc/pgproto3) 2 | [![Build Status](https://travis-ci.org/jackc/pgproto3.svg)](https://travis-ci.org/jackc/pgproto3) 3 | 4 | # pgproto3 5 | 6 | Package pgproto3 is a encoder and decoder of the PostgreSQL wire protocol version 3. 7 | 8 | pgproto3 can be used as a foundation for PostgreSQL drivers, proxies, mock servers, load balancers and more. 9 | 10 | See example/pgfortune for a playful example of a fake PostgreSQL server. 11 | 12 | Extracted from original implementation in https://github.com/jackc/pgx. 13 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/big_endian.go: -------------------------------------------------------------------------------- 1 | package pgproto3 2 | 3 | import ( 4 | "encoding/binary" 5 | ) 6 | 7 | type BigEndianBuf [8]byte 8 | 9 | func (b BigEndianBuf) Int16(n int16) []byte { 10 | buf := b[0:2] 11 | binary.BigEndian.PutUint16(buf, uint16(n)) 12 | return buf 13 | } 14 | 15 | func (b BigEndianBuf) Uint16(n uint16) []byte { 16 | buf := b[0:2] 17 | binary.BigEndian.PutUint16(buf, n) 18 | return buf 19 | } 20 | 21 | func (b BigEndianBuf) Int32(n int32) []byte { 22 | buf := b[0:4] 23 | binary.BigEndian.PutUint32(buf, uint32(n)) 24 | return buf 25 | } 26 | 27 | func (b BigEndianBuf) Uint32(n uint32) []byte { 28 | buf := b[0:4] 29 | binary.BigEndian.PutUint32(buf, n) 30 | return buf 31 | } 32 | 33 | func (b BigEndianBuf) Int64(n int64) []byte { 34 | buf := b[0:8] 35 | binary.BigEndian.PutUint64(buf, uint64(n)) 36 | return buf 37 | } 38 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/chunkreader.go: -------------------------------------------------------------------------------- 1 | package pgproto3 2 | 3 | import ( 4 | "io" 5 | 6 | "github.com/jackc/chunkreader/v2" 7 | ) 8 | 9 | // ChunkReader is an interface to decouple github.com/jackc/chunkreader from this package. 10 | type ChunkReader interface { 11 | // Next returns buf filled with the next n bytes. If an error (including a partial read) occurs, 12 | // buf must be nil. Next must preserve any partially read data. Next must not reuse buf. 13 | Next(n int) (buf []byte, err error) 14 | } 15 | 16 | // NewChunkReader creates and returns a new default ChunkReader. 17 | func NewChunkReader(r io.Reader) ChunkReader { 18 | return chunkreader.New(r) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/doc.go: -------------------------------------------------------------------------------- 1 | // Package pgproto3 is a encoder and decoder of the PostgreSQL wire protocol version 3. 2 | // 3 | // See https://www.postgresql.org/docs/current/protocol-message-formats.html for meanings of the different messages. 4 | package pgproto3 5 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgproto3/v2 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/jackc/chunkreader/v2 v2.0.0 7 | github.com/jackc/pgio v1.0.0 8 | github.com/stretchr/testify v1.4.0 9 | ) 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgproto3/v2/notice_response.go: -------------------------------------------------------------------------------- 1 | package pgproto3 2 | 3 | type NoticeResponse ErrorResponse 4 | 5 | // Backend identifies this message as sendable by the PostgreSQL backend. 6 | func (*NoticeResponse) Backend() {} 7 | 8 | // Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message 9 | // type identifier and 4 byte message length. 10 | func (dst *NoticeResponse) Decode(src []byte) error { 11 | return (*ErrorResponse)(dst).Decode(src) 12 | } 13 | 14 | // Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length. 15 | func (src *NoticeResponse) Encode(dst []byte) []byte { 16 | return append(dst, (*ErrorResponse)(src).marshalBinary('N')...) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgservicefile/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.x 5 | - tip 6 | 7 | matrix: 8 | allow_failures: 9 | - go: tip 10 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgservicefile/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/pgservicefile?status.svg)](https://godoc.org/github.com/jackc/pgservicefile) 2 | [![Build Status](https://travis-ci.org/jackc/pgservicefile.svg)](https://travis-ci.org/jackc/pgservicefile) 3 | 4 | # pgservicefile 5 | 6 | Package pgservicefile is a parser for PostgreSQL service files (e.g. `.pg_service.conf`). 7 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgservicefile/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgservicefile 2 | 3 | go 1.14 4 | 5 | require github.com/stretchr/testify v1.5.1 6 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgservicefile/go.sum: -------------------------------------------------------------------------------- 1 | github.com/davecgh/go-spew v1.1.0 h1:ZDRjVQ15GmhC3fiQ8ni8+OwkZQO4DARzQgrnXU1Liz8= 2 | github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38= 3 | github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM= 4 | github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4= 5 | github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME= 6 | github.com/stretchr/testify v1.5.1 h1:nOGnQDM7FYENwehXlg/kFVnos3rEvtKTjRvOWSzb6H4= 7 | github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA= 8 | gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0= 9 | gopkg.in/yaml.v2 v2.2.2 h1:ZCJp+EgiOT7lHqUV2J862kp8Qj64Jo6az82+3Td9dZw= 10 | gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= 11 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgtype/README.md: -------------------------------------------------------------------------------- 1 | [![](https://godoc.org/github.com/jackc/pgtype?status.svg)](https://godoc.org/github.com/jackc/pgtype) 2 | ![CI](https://github.com/jackc/pgtype/workflows/CI/badge.svg) 3 | 4 | # pgtype 5 | 6 | pgtype implements Go types for over 70 PostgreSQL types. pgtype is the type system underlying the 7 | https://github.com/jackc/pgx PostgreSQL driver. These types support the binary format for enhanced performance with pgx. 8 | They also support the database/sql `Scan` and `Value` interfaces and can be used with https://github.com/lib/pq. 9 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgtype/cidr.go: -------------------------------------------------------------------------------- 1 | package pgtype 2 | 3 | type CIDR Inet 4 | 5 | func (dst *CIDR) Set(src interface{}) error { 6 | return (*Inet)(dst).Set(src) 7 | } 8 | 9 | func (dst CIDR) Get() interface{} { 10 | return (Inet)(dst).Get() 11 | } 12 | 13 | func (src *CIDR) AssignTo(dst interface{}) error { 14 | return (*Inet)(src).AssignTo(dst) 15 | } 16 | 17 | func (dst *CIDR) DecodeText(ci *ConnInfo, src []byte) error { 18 | return (*Inet)(dst).DecodeText(ci, src) 19 | } 20 | 21 | func (dst *CIDR) DecodeBinary(ci *ConnInfo, src []byte) error { 22 | return (*Inet)(dst).DecodeBinary(ci, src) 23 | } 24 | 25 | func (src CIDR) EncodeText(ci *ConnInfo, buf []byte) ([]byte, error) { 26 | return (Inet)(src).EncodeText(ci, buf) 27 | } 28 | 29 | func (src CIDR) EncodeBinary(ci *ConnInfo, buf []byte) ([]byte, error) { 30 | return (Inet)(src).EncodeBinary(ci, buf) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgtype/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgtype 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/gofrs/uuid v4.0.0+incompatible 7 | github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530 8 | github.com/jackc/pgio v1.0.0 9 | github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c 10 | github.com/lib/pq v1.10.2 11 | github.com/shopspring/decimal v1.2.0 12 | github.com/stretchr/testify v1.7.0 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgtype/typed_range_gen.sh: -------------------------------------------------------------------------------- 1 | erb range_type=Int4range element_type=Int4 typed_range.go.erb > int4range.go 2 | erb range_type=Int8range element_type=Int8 typed_range.go.erb > int8range.go 3 | erb range_type=Tsrange element_type=Timestamp typed_range.go.erb > tsrange.go 4 | erb range_type=Tstzrange element_type=Timestamptz typed_range.go.erb > tstzrange.go 5 | erb range_type=Daterange element_type=Date typed_range.go.erb > daterange.go 6 | erb range_type=Numrange element_type=Numeric typed_range.go.erb > numrange.go 7 | goimports -w *range.go 8 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgx/v4/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | 24 | .envrc 25 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgx/v4/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jackc/pgx/v4 2 | 3 | go 1.13 4 | 5 | require ( 6 | github.com/Masterminds/semver/v3 v3.1.1 7 | github.com/cockroachdb/apd v1.1.0 8 | github.com/go-kit/log v0.1.0 9 | github.com/gofrs/uuid v4.0.0+incompatible 10 | github.com/jackc/pgconn v1.10.1 11 | github.com/jackc/pgio v1.0.0 12 | github.com/jackc/pgproto3/v2 v2.2.0 13 | github.com/jackc/pgtype v1.9.0 14 | github.com/jackc/puddle v1.2.0 15 | github.com/rs/zerolog v1.15.0 16 | github.com/shopspring/decimal v1.2.0 17 | github.com/sirupsen/logrus v1.4.2 18 | github.com/stretchr/testify v1.7.0 19 | go.uber.org/zap v1.13.0 20 | gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec 21 | ) 22 | -------------------------------------------------------------------------------- /vendor/github.com/jackc/pgx/v4/messages.go: -------------------------------------------------------------------------------- 1 | package pgx 2 | 3 | import ( 4 | "database/sql/driver" 5 | 6 | "github.com/jackc/pgtype" 7 | ) 8 | 9 | func convertDriverValuers(args []interface{}) ([]interface{}, error) { 10 | for i, arg := range args { 11 | switch arg := arg.(type) { 12 | case pgtype.BinaryEncoder: 13 | case pgtype.TextEncoder: 14 | case driver.Valuer: 15 | v, err := callValuerValue(arg) 16 | if err != nil { 17 | return nil, err 18 | } 19 | args[i] = v 20 | } 21 | } 22 | return args, nil 23 | } 24 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/inflection/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jinzhu/inflection 2 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/inflection/wercker.yml: -------------------------------------------------------------------------------- 1 | box: golang 2 | 3 | build: 4 | steps: 5 | - setup-go-workspace 6 | 7 | # Gets the dependencies 8 | - script: 9 | name: go get 10 | code: | 11 | go get 12 | 13 | # Build the project 14 | - script: 15 | name: go build 16 | code: | 17 | go build ./... 18 | 19 | # Test the project 20 | - script: 21 | name: go test 22 | code: | 23 | go test ./... 24 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/now/Guardfile: -------------------------------------------------------------------------------- 1 | guard 'gotest' do 2 | watch(%r{\.go$}) 3 | end 4 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/now/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/jinzhu/now 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /vendor/github.com/jinzhu/now/time.go: -------------------------------------------------------------------------------- 1 | package now 2 | 3 | import "time" 4 | 5 | func formatTimeToList(t time.Time) []int { 6 | hour, min, sec := t.Clock() 7 | year, month, day := t.Date() 8 | return []int{t.Nanosecond(), sec, min, hour, day, int(month), year} 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/.codecov.yml: -------------------------------------------------------------------------------- 1 | ignore: 2 | - "output_tests/.*" 3 | 4 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /bug_test.go 3 | /coverage.txt 4 | /.idea 5 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8.x 5 | - 1.x 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - ./test.sh 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/modern-go/concurrent" 6 | packages = ["."] 7 | revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" 8 | version = "1.0.0" 9 | 10 | [[projects]] 11 | name = "github.com/modern-go/reflect2" 12 | packages = ["."] 13 | revision = "4b7aa43c6742a2c18fdef89dd197aaae7dac7ccd" 14 | version = "1.0.1" 15 | 16 | [solve-meta] 17 | analyzer-name = "dep" 18 | analyzer-version = 1 19 | inputs-digest = "ea54a775e5a354cb015502d2e7aa4b74230fc77e894f34a838b268c25ec8eeb8" 20 | solver-name = "gps-cdcl" 21 | solver-version = 1 22 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/Gopkg.toml: -------------------------------------------------------------------------------- 1 | # Gopkg.toml example 2 | # 3 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 4 | # for detailed Gopkg.toml documentation. 5 | # 6 | # required = ["github.com/user/thing/cmd/thing"] 7 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 8 | # 9 | # [[constraint]] 10 | # name = "github.com/user/project" 11 | # version = "1.0.0" 12 | # 13 | # [[constraint]] 14 | # name = "github.com/user/project2" 15 | # branch = "dev" 16 | # source = "github.com/myfork/project2" 17 | # 18 | # [[override]] 19 | # name = "github.com/x/y" 20 | # version = "2.4.0" 21 | 22 | ignored = ["github.com/davecgh/go-spew*","github.com/google/gofuzz*","github.com/stretchr/testify*"] 23 | 24 | [[constraint]] 25 | name = "github.com/modern-go/reflect2" 26 | version = "1.0.1" 27 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/build.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | set -e 3 | set -x 4 | 5 | if [ ! -d /tmp/build-golang/src/github.com/json-iterator ]; then 6 | mkdir -p /tmp/build-golang/src/github.com/json-iterator 7 | ln -s $PWD /tmp/build-golang/src/github.com/json-iterator/go 8 | fi 9 | export GOPATH=/tmp/build-golang 10 | go get -u github.com/golang/dep/cmd/dep 11 | cd /tmp/build-golang/src/github.com/json-iterator/go 12 | exec $GOPATH/bin/dep ensure -update 13 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/json-iterator/go 2 | 3 | go 1.12 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 7 | github.com/google/gofuzz v1.0.0 8 | github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421 9 | github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 10 | github.com/stretchr/testify v1.3.0 11 | ) 12 | -------------------------------------------------------------------------------- /vendor/github.com/json-iterator/go/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -coverprofile=profile.out -coverpkg=github.com/json-iterator/go $d 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/.gitignore: -------------------------------------------------------------------------------- 1 | *.exe 2 | *.dll 3 | *.so 4 | *.dylib 5 | 6 | *.test 7 | 8 | *.out 9 | *.txt 10 | 11 | vendor/ -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.9.x 5 | - 1.10.x 6 | - 1.11.x 7 | - 1.12.x 8 | - 1.13.x 9 | - tip 10 | 11 | before_install: 12 | - go get -t -v ./... 13 | 14 | script: 15 | - go test -race -coverprofile=coverage.txt -covermode=atomic 16 | 17 | after_success: 18 | - bash <(curl -s https://codecov.io/bash) -------------------------------------------------------------------------------- /vendor/github.com/leodido/go-urn/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/leodido/go-urn 2 | 3 | go 1.13 4 | 5 | require github.com/stretchr/testify v1.4.0 6 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | go: 4 | - 1.13.x 5 | - tip 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | 10 | script: 11 | - ./go.test.sh 12 | 13 | after_success: 14 | - bash <(curl -s https://codecov.io/bash) 15 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/doc.go: -------------------------------------------------------------------------------- 1 | // Package isatty implements interface to isatty 2 | package isatty 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mattn/go-isatty 2 | 3 | go 1.12 4 | 5 | require golang.org/x/sys v0.0.0-20200116001909-b77594299b42 6 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.sum: -------------------------------------------------------------------------------- 1 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42 h1:vEOn+mP2zCOVzKckCZy6YsCtDblrpj/w7B9nxGNELpg= 2 | golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= 3 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/go.test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list ./... | grep -v vendor); do 7 | go test -race -coverprofile=profile.out -covermode=atomic "$d" 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_bsd.go: -------------------------------------------------------------------------------- 1 | // +build darwin freebsd openbsd netbsd dragonfly 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | // IsTerminal return true if the file descriptor is terminal. 9 | func IsTerminal(fd uintptr) bool { 10 | _, err := unix.IoctlGetTermios(int(fd), unix.TIOCGETA) 11 | return err == nil 12 | } 13 | 14 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 15 | // terminal. This is also always false on this environment. 16 | func IsCygwinTerminal(fd uintptr) bool { 17 | return false 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_others.go: -------------------------------------------------------------------------------- 1 | // +build appengine js nacl 2 | 3 | package isatty 4 | 5 | // IsTerminal returns true if the file descriptor is terminal which 6 | // is always false on js and appengine classic which is a sandboxed PaaS. 7 | func IsTerminal(fd uintptr) bool { 8 | return false 9 | } 10 | 11 | // IsCygwinTerminal() return true if the file descriptor is a cygwin or msys2 12 | // terminal. This is also always false on this environment. 13 | func IsCygwinTerminal(fd uintptr) bool { 14 | return false 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_plan9.go: -------------------------------------------------------------------------------- 1 | // +build plan9 2 | 3 | package isatty 4 | 5 | import ( 6 | "syscall" 7 | ) 8 | 9 | // IsTerminal returns true if the given file descriptor is a terminal. 10 | func IsTerminal(fd uintptr) bool { 11 | path, err := syscall.Fd2path(int(fd)) 12 | if err != nil { 13 | return false 14 | } 15 | return path == "/dev/cons" || path == "/mnt/term/dev/cons" 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_solaris.go: -------------------------------------------------------------------------------- 1 | // +build solaris 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import ( 7 | "golang.org/x/sys/unix" 8 | ) 9 | 10 | // IsTerminal returns true if the given file descriptor is a terminal. 11 | // see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c 12 | func IsTerminal(fd uintptr) bool { 13 | var termio unix.Termio 14 | err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio) 15 | return err == nil 16 | } 17 | 18 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 19 | // terminal. This is also always false on this environment. 20 | func IsCygwinTerminal(fd uintptr) bool { 21 | return false 22 | } 23 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/isatty_tcgets.go: -------------------------------------------------------------------------------- 1 | // +build linux aix 2 | // +build !appengine 3 | 4 | package isatty 5 | 6 | import "golang.org/x/sys/unix" 7 | 8 | // IsTerminal return true if the file descriptor is terminal. 9 | func IsTerminal(fd uintptr) bool { 10 | _, err := unix.IoctlGetTermios(int(fd), unix.TCGETS) 11 | return err == nil 12 | } 13 | 14 | // IsCygwinTerminal return true if the file descriptor is a cygwin or msys2 15 | // terminal. This is also always false on this environment. 16 | func IsCygwinTerminal(fd uintptr) bool { 17 | return false 18 | } 19 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-isatty/renovate.json: -------------------------------------------------------------------------------- 1 | { 2 | "extends": [ 3 | "config:base" 4 | ], 5 | "postUpdateOptions": [ 6 | "gomodTidy" 7 | ] 8 | } 9 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/.codecov.yml: -------------------------------------------------------------------------------- 1 | coverage: 2 | status: 3 | project: off 4 | patch: off 5 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/.gitignore: -------------------------------------------------------------------------------- 1 | *.db 2 | *.exe 3 | *.dll 4 | *.o 5 | 6 | # VSCode 7 | .vscode 8 | 9 | # Exclude from upgrade 10 | upgrade/*.c 11 | upgrade/*.h 12 | 13 | # Exclude upgrade binary 14 | upgrade/upgrade 15 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/mattn/go-sqlite3 2 | 3 | go 1.12 4 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/go.sum: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/mattn/go-sqlite3/go.sum -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_libsqlite3.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build libsqlite3 7 | 8 | package sqlite3 9 | 10 | /* 11 | #cgo CFLAGS: -DUSE_LIBSQLITE3 12 | #cgo linux LDFLAGS: -lsqlite3 13 | #cgo darwin LDFLAGS: -L/usr/local/opt/sqlite/lib -lsqlite3 14 | #cgo darwin CFLAGS: -I/usr/local/opt/sqlite/include 15 | #cgo openbsd LDFLAGS: -lsqlite3 16 | #cgo solaris LDFLAGS: -lsqlite3 17 | #cgo windows LDFLAGS: -lsqlite3 18 | */ 19 | import "C" 20 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_load_extension_omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build sqlite_omit_load_extension 7 | 8 | package sqlite3 9 | 10 | /* 11 | #cgo CFLAGS: -DSQLITE_OMIT_LOAD_EXTENSION 12 | */ 13 | import "C" 14 | import ( 15 | "errors" 16 | ) 17 | 18 | func (c *SQLiteConn) loadExtensions(extensions []string) error { 19 | return errors.New("Extensions have been disabled for static builds") 20 | } 21 | 22 | func (c *SQLiteConn) LoadExtension(lib string, entry string) error { 23 | return errors.New("Extensions have been disabled for static builds") 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_allow_uri_authority.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // Copyright (C) 2018 G.J.R. Timmer . 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build sqlite_allow_uri_authority 8 | 9 | package sqlite3 10 | 11 | /* 12 | #cgo CFLAGS: -DSQLITE_ALLOW_URI_AUTHORITY 13 | #cgo LDFLAGS: -lm 14 | */ 15 | import "C" 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_app_armor.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // Copyright (C) 2018 G.J.R. Timmer . 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build !windows 8 | // +build sqlite_app_armor 9 | 10 | package sqlite3 11 | 12 | /* 13 | #cgo CFLAGS: -DSQLITE_ENABLE_API_ARMOR 14 | #cgo LDFLAGS: -lm 15 | */ 16 | import "C" 17 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_column_metadata.go: -------------------------------------------------------------------------------- 1 | // +build sqlite_column_metadata 2 | 3 | package sqlite3 4 | 5 | /* 6 | #ifndef USE_LIBSQLITE3 7 | #cgo CFLAGS: -DSQLITE_ENABLE_COLUMN_METADATA 8 | #include 9 | #else 10 | #include 11 | #endif 12 | */ 13 | import "C" 14 | 15 | // ColumnTableName returns the table that is the origin of a particular result 16 | // column in a SELECT statement. 17 | // 18 | // See https://www.sqlite.org/c3ref/column_database_name.html 19 | func (s *SQLiteStmt) ColumnTableName(n int) string { 20 | return C.GoString(C.sqlite3_column_table_name(s.s, C.int(n))) 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_foreign_keys.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // Copyright (C) 2018 G.J.R. Timmer . 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build sqlite_foreign_keys 8 | 9 | package sqlite3 10 | 11 | /* 12 | #cgo CFLAGS: -DSQLITE_DEFAULT_FOREIGN_KEYS=1 13 | #cgo LDFLAGS: -lm 14 | */ 15 | import "C" 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_fts5.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build sqlite_fts5 fts5 7 | 8 | package sqlite3 9 | 10 | /* 11 | #cgo CFLAGS: -DSQLITE_ENABLE_FTS5 12 | #cgo LDFLAGS: -lm 13 | */ 14 | import "C" 15 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_icu.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build sqlite_icu icu 7 | 8 | package sqlite3 9 | 10 | /* 11 | #cgo LDFLAGS: -licuuc -licui18n 12 | #cgo CFLAGS: -DSQLITE_ENABLE_ICU 13 | #cgo darwin CFLAGS: -I/usr/local/opt/icu4c/include 14 | #cgo darwin LDFLAGS: -L/usr/local/opt/icu4c/lib 15 | #cgo openbsd LDFLAGS: -lsqlite3 16 | */ 17 | import "C" 18 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_introspect.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // Copyright (C) 2018 G.J.R. Timmer . 3 | 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build sqlite_introspect 8 | 9 | package sqlite3 10 | 11 | /* 12 | #cgo CFLAGS: -DSQLITE_INTROSPECTION_PRAGMAS 13 | #cgo LDFLAGS: -lm 14 | */ 15 | import "C" 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_json1.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build sqlite_json sqlite_json1 json1 7 | 8 | package sqlite3 9 | 10 | /* 11 | #cgo CFLAGS: -DSQLITE_ENABLE_JSON1 12 | */ 13 | import "C" 14 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_preupdate.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 G.J.R. Timmer . 2 | // Copyright (C) 2018 segment.com 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build cgo 8 | 9 | package sqlite3 10 | 11 | // SQLitePreUpdateData represents all of the data available during a 12 | // pre-update hook call. 13 | type SQLitePreUpdateData struct { 14 | Conn *SQLiteConn 15 | Op int 16 | DatabaseName string 17 | TableName string 18 | OldRowID int64 19 | NewRowID int64 20 | } 21 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_preupdate_omit.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 G.J.R. Timmer . 2 | // Copyright (C) 2018 segment.com 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build !sqlite_preupdate_hook,cgo 8 | 9 | package sqlite3 10 | 11 | // RegisterPreUpdateHook sets the pre-update hook for a connection. 12 | // 13 | // The callback is passed a SQLitePreUpdateData struct with the data for 14 | // the update, as well as methods for fetching copies of impacted data. 15 | // 16 | // If there is an existing update hook for this connection, it will be 17 | // removed. If callback is nil the existing hook (if any) will be removed 18 | // without creating a new one. 19 | func (c *SQLiteConn) RegisterPreUpdateHook(callback func(SQLitePreUpdateData)) { 20 | // NOOP 21 | } 22 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_secure_delete.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // Copyright (C) 2018 G.J.R. Timmer . 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build sqlite_secure_delete 8 | 9 | package sqlite3 10 | 11 | /* 12 | #cgo CFLAGS: -DSQLITE_SECURE_DELETE=1 13 | #cgo LDFLAGS: -lm 14 | */ 15 | import "C" 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_secure_delete_fast.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // Copyright (C) 2018 G.J.R. Timmer . 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build sqlite_secure_delete_fast 8 | 9 | package sqlite3 10 | 11 | /* 12 | #cgo CFLAGS: -DSQLITE_SECURE_DELETE=FAST 13 | #cgo LDFLAGS: -lm 14 | */ 15 | import "C" 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_stat4.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // Copyright (C) 2018 G.J.R. Timmer . 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build sqlite_stat4 8 | 9 | package sqlite3 10 | 11 | /* 12 | #cgo CFLAGS: -DSQLITE_ENABLE_STAT4 13 | #cgo LDFLAGS: -lm 14 | */ 15 | import "C" 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vacuum_full.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // Copyright (C) 2018 G.J.R. Timmer . 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build sqlite_vacuum_full 8 | 9 | package sqlite3 10 | 11 | /* 12 | #cgo CFLAGS: -DSQLITE_DEFAULT_AUTOVACUUM=1 13 | #cgo LDFLAGS: -lm 14 | */ 15 | import "C" 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_opt_vacuum_incr.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // Copyright (C) 2018 G.J.R. Timmer . 3 | // 4 | // Use of this source code is governed by an MIT-style 5 | // license that can be found in the LICENSE file. 6 | 7 | // +build sqlite_vacuum_incr 8 | 9 | package sqlite3 10 | 11 | /* 12 | #cgo CFLAGS: -DSQLITE_DEFAULT_AUTOVACUUM=2 13 | #cgo LDFLAGS: -lm 14 | */ 15 | import "C" 16 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_other.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build !windows 7 | 8 | package sqlite3 9 | 10 | /* 11 | #cgo CFLAGS: -I. 12 | #cgo linux LDFLAGS: -ldl 13 | #cgo linux,ppc LDFLAGS: -lpthread 14 | #cgo linux,ppc64 LDFLAGS: -lpthread 15 | #cgo linux,ppc64le LDFLAGS: -lpthread 16 | */ 17 | import "C" 18 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_solaris.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build solaris 7 | 8 | package sqlite3 9 | 10 | /* 11 | #cgo CFLAGS: -D__EXTENSIONS__=1 12 | #cgo LDFLAGS: -lc 13 | */ 14 | import "C" 15 | -------------------------------------------------------------------------------- /vendor/github.com/mattn/go-sqlite3/sqlite3_windows.go: -------------------------------------------------------------------------------- 1 | // Copyright (C) 2019 Yasuhiro Matsumoto . 2 | // 3 | // Use of this source code is governed by an MIT-style 4 | // license that can be found in the LICENSE file. 5 | 6 | // +build windows 7 | 8 | package sqlite3 9 | 10 | /* 11 | #cgo CFLAGS: -I. 12 | #cgo CFLAGS: -fno-stack-check 13 | #cgo CFLAGS: -fno-stack-protector 14 | #cgo CFLAGS: -mno-stack-arg-probe 15 | #cgo LDFLAGS: -lmingwex -lmingw32 16 | #cgo windows,386 CFLAGS: -D_USE_32BIT_TIME_T 17 | */ 18 | import "C" 19 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/concurrent/README.md: -------------------------------------------------------------------------------- 1 | # concurrent 2 | concurrency utilities 3 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/concurrent/executor.go: -------------------------------------------------------------------------------- 1 | package concurrent 2 | 3 | import "context" 4 | 5 | type Executor interface { 6 | Go(handler func(ctx context.Context)) 7 | } -------------------------------------------------------------------------------- /vendor/github.com/modern-go/concurrent/go_above_19.go: -------------------------------------------------------------------------------- 1 | //+build go1.9 2 | 3 | package concurrent 4 | 5 | import "sync" 6 | 7 | type Map struct { 8 | sync.Map 9 | } 10 | 11 | func NewMap() *Map { 12 | return &Map{} 13 | } -------------------------------------------------------------------------------- /vendor/github.com/modern-go/concurrent/go_below_19.go: -------------------------------------------------------------------------------- 1 | //+build !go1.9 2 | 3 | package concurrent 4 | 5 | import "sync" 6 | 7 | type Map struct { 8 | lock sync.RWMutex 9 | data map[interface{}]interface{} 10 | } 11 | 12 | func NewMap() *Map { 13 | return &Map{ 14 | data: make(map[interface{}]interface{}, 32), 15 | } 16 | } 17 | 18 | func (m *Map) Load(key interface{}) (elem interface{}, found bool) { 19 | m.lock.RLock() 20 | elem, found = m.data[key] 21 | m.lock.RUnlock() 22 | return 23 | } 24 | 25 | func (m *Map) Store(key interface{}, elem interface{}) { 26 | m.lock.Lock() 27 | m.data[key] = elem 28 | m.lock.Unlock() 29 | } 30 | 31 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /coverage.txt 3 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - 1.8.x 5 | - 1.x 6 | 7 | before_install: 8 | - go get -t -v ./... 9 | - go get -t -v github.com/modern-go/reflect2-tests/... 10 | 11 | script: 12 | - ./test.sh 13 | 14 | after_success: 15 | - bash <(curl -s https://codecov.io/bash) 16 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | name = "github.com/modern-go/concurrent" 6 | packages = ["."] 7 | revision = "e0a39a4cb4216ea8db28e22a69f4ec25610d513a" 8 | version = "1.0.0" 9 | 10 | [solve-meta] 11 | analyzer-name = "dep" 12 | analyzer-version = 1 13 | inputs-digest = "daee8a88b3498b61c5640056665b8b9eea062006f5e596bbb6a3ed9119a11ec7" 14 | solver-name = "gps-cdcl" 15 | solver-version = 1 16 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/go_above_17.go: -------------------------------------------------------------------------------- 1 | //+build go1.7 2 | 3 | package reflect2 4 | 5 | import "unsafe" 6 | 7 | //go:linkname resolveTypeOff reflect.resolveTypeOff 8 | func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer 9 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/go_above_19.go: -------------------------------------------------------------------------------- 1 | //+build go1.9 2 | 3 | package reflect2 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | //go:linkname makemap reflect.makemap 10 | func makemap(rtype unsafe.Pointer, cap int) (m unsafe.Pointer) 11 | 12 | func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer { 13 | return makemap(rtype, cap) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/go_below_17.go: -------------------------------------------------------------------------------- 1 | //+build !go1.7 2 | 3 | package reflect2 4 | 5 | import "unsafe" 6 | 7 | func resolveTypeOff(rtype unsafe.Pointer, off int32) unsafe.Pointer { 8 | return nil 9 | } 10 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/go_below_19.go: -------------------------------------------------------------------------------- 1 | //+build !go1.9 2 | 3 | package reflect2 4 | 5 | import ( 6 | "unsafe" 7 | ) 8 | 9 | //go:linkname makemap reflect.makemap 10 | func makemap(rtype unsafe.Pointer) (m unsafe.Pointer) 11 | 12 | func makeMapWithSize(rtype unsafe.Pointer, cap int) unsafe.Pointer { 13 | return makemap(rtype) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/reflect2_amd64.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/modern-go/reflect2/reflect2_amd64.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_386.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/modern-go/reflect2/relfect2_386.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/modern-go/reflect2/relfect2_amd64p32.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_arm.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/modern-go/reflect2/relfect2_arm.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_arm64.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/modern-go/reflect2/relfect2_arm64.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_mips64x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/modern-go/reflect2/relfect2_mips64x.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_mipsx.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/modern-go/reflect2/relfect2_mipsx.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/modern-go/reflect2/relfect2_ppc64x.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/relfect2_s390x.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/modern-go/reflect2/relfect2_s390x.s -------------------------------------------------------------------------------- /vendor/github.com/modern-go/reflect2/test.sh: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | 3 | set -e 4 | echo "" > coverage.txt 5 | 6 | for d in $(go list github.com/modern-go/reflect2-tests/... | grep -v vendor); do 7 | go test -coverprofile=profile.out -coverpkg=github.com/modern-go/reflect2 $d 8 | if [ -f profile.out ]; then 9 | cat profile.out >> coverage.txt 10 | rm profile.out 11 | fi 12 | done 13 | -------------------------------------------------------------------------------- /vendor/github.com/nicksnyder/go-i18n/v2/internal/plural/doc.go: -------------------------------------------------------------------------------- 1 | // Package plural provides support for pluralizing messages 2 | // according to CLDR rules http://cldr.unicode.org/index/cldr-spec/plural-rules 3 | package plural 4 | -------------------------------------------------------------------------------- /vendor/github.com/nicksnyder/go-i18n/v2/internal/plural/form.go: -------------------------------------------------------------------------------- 1 | package plural 2 | 3 | // Form represents a language pluralization form as defined here: 4 | // http://cldr.unicode.org/index/cldr-spec/plural-rules 5 | type Form string 6 | 7 | // All defined plural forms. 8 | const ( 9 | Invalid Form = "" 10 | Zero Form = "zero" 11 | One Form = "one" 12 | Two Form = "two" 13 | Few Form = "few" 14 | Many Form = "many" 15 | Other Form = "other" 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/github.com/nicksnyder/go-i18n/v2/internal/plural/rules.go: -------------------------------------------------------------------------------- 1 | package plural 2 | 3 | import "golang.org/x/text/language" 4 | 5 | // Rules is a set of plural rules by language tag. 6 | type Rules map[language.Tag]*Rule 7 | 8 | // Rule returns the closest matching plural rule for the language tag 9 | // or nil if no rule could be found. 10 | func (r Rules) Rule(tag language.Tag) *Rule { 11 | t := tag 12 | for { 13 | if rule := r[t]; rule != nil { 14 | return rule 15 | } 16 | t = t.Parent() 17 | if t.IsRoot() { 18 | break 19 | } 20 | } 21 | base, _ := tag.Base() 22 | baseTag, _ := language.Parse(base.String()) 23 | return r[baseTag] 24 | } 25 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/ulid/v2/.gitignore: -------------------------------------------------------------------------------- 1 | #### joe made this: http://goel.io/joe 2 | 3 | #####=== Go ===##### 4 | 5 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 6 | *.o 7 | *.a 8 | *.so 9 | 10 | # Folders 11 | _obj 12 | _test 13 | 14 | # Architecture specific extensions/prefixes 15 | *.[568vq] 16 | [568vq].out 17 | 18 | *.cgo1.go 19 | *.cgo2.c 20 | _cgo_defun.c 21 | _cgo_gotypes.go 22 | _cgo_export.* 23 | 24 | _testmain.go 25 | 26 | *.exe 27 | *.test 28 | *.prof 29 | 30 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/ulid/v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | sudo: false 3 | env: 4 | GO111MODULE=on 5 | go: 6 | - 1.10.x 7 | - 1.11.x 8 | - 1.12.x 9 | install: 10 | - go get -u -v golang.org/x/lint/golint 11 | - go get golang.org/x/tools/cmd/cover 12 | - go get github.com/mattn/goveralls 13 | - go get -d -t -v ./... 14 | - go build -v ./... 15 | script: 16 | - go vet ./... 17 | - $HOME/gopath/bin/golint . 18 | - go test -v -race ./... 19 | - go test -v -covermode=count -coverprofile=cov.out 20 | - $HOME/gopath/bin/goveralls -coverprofile=cov.out -service=travis-ci -repotoken "$COVERALLS_TOKEN" || true 21 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/ulid/v2/AUTHORS.md: -------------------------------------------------------------------------------- 1 | - Peter Bourgon (@peterbourgon) 2 | - Tomás Senart (@tsenart) 3 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/ulid/v2/CHANGELOG.md: -------------------------------------------------------------------------------- 1 | ## 1.3.1 / 2018-10-02 2 | 3 | * Use underlying entropy source for random increments in Monotonic (#32) 4 | 5 | ## 1.3.0 / 2018-09-29 6 | 7 | * Monotonic entropy support (#31) 8 | 9 | ## 1.2.0 / 2018-09-09 10 | 11 | * Add a function to convert Unix time in milliseconds back to time.Time (#30) 12 | 13 | ## 1.1.0 / 2018-08-15 14 | 15 | * Ensure random part is always read from the entropy reader in full (#28) 16 | 17 | ## 1.0.0 / 2018-07-29 18 | 19 | * Add ParseStrict and MustParseStrict functions (#26) 20 | * Enforce overflow checking when parsing (#20) 21 | 22 | ## 0.3.0 / 2017-01-03 23 | 24 | * Implement ULID.Compare method 25 | 26 | ## 0.2.0 / 2016-12-13 27 | 28 | * Remove year 2262 Timestamp bug. (#1) 29 | * Gracefully handle invalid encodings when parsing. 30 | 31 | ## 0.1.0 / 2016-12-06 32 | 33 | * First ULID release 34 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/ulid/v2/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing 2 | 3 | We use GitHub to manage reviews of pull requests. 4 | 5 | * If you have a trivial fix or improvement, go ahead and create a pull 6 | request, addressing (with `@...`) one or more of the maintainers 7 | (see [AUTHORS.md](AUTHORS.md)) in the description of the pull request. 8 | 9 | * If you plan to do something more involved, first propose your ideas 10 | in a Github issue. This will avoid unnecessary work and surely give 11 | you and us a good deal of inspiration. 12 | 13 | * Relevant coding style guidelines are the [Go Code Review 14 | Comments](https://code.google.com/p/go-wiki/wiki/CodeReviewComments) 15 | and the _Formatting and style_ section of Peter Bourgon's [Go: Best 16 | Practices for Production 17 | Environments](http://peter.bourgon.org/go-in-production/#formatting-and-style). 18 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/ulid/v2/Gopkg.lock: -------------------------------------------------------------------------------- 1 | # This file is autogenerated, do not edit; changes may be undone by the next 'dep ensure'. 2 | 3 | 4 | [[projects]] 5 | branch = "master" 6 | name = "github.com/pborman/getopt" 7 | packages = ["v2"] 8 | revision = "7148bc3a4c3008adfcab60cbebfd0576018f330b" 9 | 10 | [solve-meta] 11 | analyzer-name = "dep" 12 | analyzer-version = 1 13 | inputs-digest = "6779b05abd5cd429c5393641d2453005a3cb74a400d161b2b5c5d0ca2e10e116" 14 | solver-name = "gps-cdcl" 15 | solver-version = 1 16 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/ulid/v2/Gopkg.toml: -------------------------------------------------------------------------------- 1 | 2 | # Gopkg.toml example 3 | # 4 | # Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md 5 | # for detailed Gopkg.toml documentation. 6 | # 7 | # required = ["github.com/user/thing/cmd/thing"] 8 | # ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"] 9 | # 10 | # [[constraint]] 11 | # name = "github.com/user/project" 12 | # version = "1.0.0" 13 | # 14 | # [[constraint]] 15 | # name = "github.com/user/project2" 16 | # branch = "dev" 17 | # source = "github.com/myfork/project2" 18 | # 19 | # [[override]] 20 | # name = "github.com/x/y" 21 | # version = "2.4.0" 22 | 23 | 24 | [[constraint]] 25 | branch = "master" 26 | name = "github.com/pborman/getopt" 27 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/ulid/v2/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/oklog/ulid/v2 2 | 3 | require github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30 4 | -------------------------------------------------------------------------------- /vendor/github.com/oklog/ulid/v2/go.sum: -------------------------------------------------------------------------------- 1 | github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30 h1:BHT1/DKsYDGkUgQ2jmMaozVcdk+sVfz0+1ZJq4zkWgw= 2 | github.com/pborman/getopt v0.0.0-20170112200414-7148bc3a4c30/go.mod h1:85jBQOZwpVEaDAr341tbn15RS4fCAsIst0qp7i8ex1o= 3 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.gitignore: -------------------------------------------------------------------------------- 1 | # Compiled Object files, Static and Dynamic libs (Shared Objects) 2 | *.o 3 | *.a 4 | *.so 5 | 6 | # Folders 7 | _obj 8 | _test 9 | 10 | # Architecture specific extensions/prefixes 11 | *.[568vq] 12 | [568vq].out 13 | 14 | *.cgo1.go 15 | *.cgo2.c 16 | _cgo_defun.c 17 | _cgo_gotypes.go 18 | _cgo_export.* 19 | 20 | _testmain.go 21 | 22 | *.exe 23 | *.test 24 | *.prof 25 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | go_import_path: github.com/pkg/errors 3 | go: 4 | - 1.11.x 5 | - 1.12.x 6 | - 1.13.x 7 | - tip 8 | 9 | script: 10 | - make check 11 | -------------------------------------------------------------------------------- /vendor/github.com/pkg/errors/appveyor.yml: -------------------------------------------------------------------------------- 1 | version: build-{build}.{branch} 2 | 3 | clone_folder: C:\gopath\src\github.com\pkg\errors 4 | shallow_clone: true # for startup speed 5 | 6 | environment: 7 | GOPATH: C:\gopath 8 | 9 | platform: 10 | - x64 11 | 12 | # http://www.appveyor.com/docs/installed-software 13 | install: 14 | # some helpful output for debugging builds 15 | - go version 16 | - go env 17 | # pre-installed MinGW at C:\MinGW is 32bit only 18 | # but MSYS2 at C:\msys64 has mingw64 19 | - set PATH=C:\msys64\mingw64\bin;%PATH% 20 | - gcc --version 21 | - g++ --version 22 | 23 | build_script: 24 | - go install -v ./... 25 | 26 | test_script: 27 | - set PATH=C:\gopath\bin;%PATH% 28 | - go test -v ./... 29 | 30 | #artifacts: 31 | # - path: '%GOPATH%\bin\*.exe' 32 | deploy: off 33 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/0_importpath.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | package codec // import "github.com/ugorji/go/codec" 5 | 6 | // This establishes that this package must be imported as github.com/ugorji/go/codec. 7 | // It makes forking easier, and plays well with pre-module releases of go. 8 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/codecgen.go: -------------------------------------------------------------------------------- 1 | // +build codecgen generated 2 | 3 | package codec 4 | 5 | // this file is here, to set the codecgen variable to true 6 | // when the build tag codecgen is set. 7 | // 8 | // this allows us do specific things e.g. skip missing fields tests, 9 | // when running in codecgen mode. 10 | 11 | func init() { 12 | codecgen = true 13 | } 14 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/gen-enc-chan.go.tmpl: -------------------------------------------------------------------------------- 1 | {{.Label}}: 2 | switch timeout{{.Sfx}} := z.EncBasicHandle().ChanRecvTimeout; { 3 | case timeout{{.Sfx}} == 0: // only consume available 4 | for { 5 | select { 6 | case b{{.Sfx}} := <-{{.Chan}}: 7 | {{ .Slice }} = append({{.Slice}}, b{{.Sfx}}) 8 | default: 9 | break {{.Label}} 10 | } 11 | } 12 | case timeout{{.Sfx}} > 0: // consume until timeout 13 | tt{{.Sfx}} := time.NewTimer(timeout{{.Sfx}}) 14 | for { 15 | select { 16 | case b{{.Sfx}} := <-{{.Chan}}: 17 | {{.Slice}} = append({{.Slice}}, b{{.Sfx}}) 18 | case <-tt{{.Sfx}}.C: 19 | // close(tt.C) 20 | break {{.Label}} 21 | } 22 | } 23 | default: // consume until close 24 | for b{{.Sfx}} := range {{.Chan}} { 25 | {{.Slice}} = append({{.Slice}}, b{{.Sfx}}) 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/go.mod: -------------------------------------------------------------------------------- 1 | module github.com/ugorji/go/codec 2 | 3 | require ( 4 | github.com/ugorji/go v1.1.7 5 | ) 6 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_arrayof_gte_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.5 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | const reflectArrayOfSupported = true 11 | 12 | func reflectArrayOf(count int, elem reflect.Type) reflect.Type { 13 | return reflect.ArrayOf(count, elem) 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_arrayof_lt_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.5 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | const reflectArrayOfSupported = false 11 | 12 | func reflectArrayOf(count int, elem reflect.Type) reflect.Type { 13 | panic("codec: reflect.ArrayOf unsupported in this go version") 14 | } 15 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_fmt_time_gte_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.5 5 | 6 | package codec 7 | 8 | import "time" 9 | 10 | func fmtTime(t time.Time, b []byte) []byte { 11 | return t.AppendFormat(b, time.RFC3339Nano) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_fmt_time_lt_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.5 5 | 6 | package codec 7 | 8 | import "time" 9 | 10 | func fmtTime(t time.Time, b []byte) []byte { 11 | s := t.Format(time.RFC3339Nano) 12 | b = b[:len(s)] 13 | copy(b, s) 14 | return b 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_makemap_gte_go19.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.9 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | func makeMapReflect(t reflect.Type, size int) reflect.Value { 11 | if size < 0 { 12 | return reflect.MakeMapWithSize(t, 4) 13 | } 14 | return reflect.MakeMapWithSize(t, size) 15 | } 16 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_makemap_lt_go19.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.9 5 | 6 | package codec 7 | 8 | import "reflect" 9 | 10 | func makeMapReflect(t reflect.Type, size int) reflect.Value { 11 | return reflect.MakeMap(t) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_gte_go110.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.10 5 | 6 | package codec 7 | 8 | const allowSetUnexportedEmbeddedPtr = false 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_unexportedembeddedptr_lt_go110.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.10 5 | 6 | package codec 7 | 8 | const allowSetUnexportedEmbeddedPtr = true 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_unsupported_lt_go14.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.4 5 | 6 | package codec 7 | 8 | // This codec package will only work for go1.4 and above. 9 | // This is for the following reasons: 10 | // - go 1.4 was released in 2014 11 | // - go runtime is written fully in go 12 | // - interface only holds pointers 13 | // - reflect.Value is stabilized as 3 words 14 | 15 | func init() { 16 | panic("codec: go 1.3 and below are not supported") 17 | } 18 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.5,!go1.6 5 | 6 | package codec 7 | 8 | import "os" 9 | 10 | var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") == "1" 11 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_eq_go16.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.6,!go1.7 5 | 6 | package codec 7 | 8 | import "os" 9 | 10 | var genCheckVendor = os.Getenv("GO15VENDOREXPERIMENT") != "0" 11 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_gte_go17.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build go1.7 5 | 6 | package codec 7 | 8 | const genCheckVendor = true 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/goversion_vendor_lt_go15.go: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2012-2018 Ugorji Nwoke. All rights reserved. 2 | // Use of this source code is governed by a MIT license found in the LICENSE file. 3 | 4 | // +build !go1.5 5 | 6 | package codec 7 | 8 | var genCheckVendor = false 9 | -------------------------------------------------------------------------------- /vendor/github.com/ugorji/go/codec/helper.s: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/uberswe/golang-base-project/06a236549da7e8aee0039446d690f334eba7e82a/vendor/github.com/ugorji/go/codec/helper.s -------------------------------------------------------------------------------- /vendor/github.com/ulule/limiter/v3/.dockerignore: -------------------------------------------------------------------------------- 1 | # Circle CI directory 2 | .circleci 3 | 4 | # Example directory 5 | examples 6 | -------------------------------------------------------------------------------- /vendor/github.com/ulule/limiter/v3/.editorconfig: -------------------------------------------------------------------------------- 1 | root = true 2 | 3 | [*] 4 | end_of_line = lf 5 | indent_size = 4 6 | indent_style = space 7 | insert_final_newline = true 8 | trim_trailing_whitespace = true 9 | insert_final_newline = true 10 | charset = utf-8 11 | 12 | [*.{yml,yaml}] 13 | indent_size = 2 14 | 15 | [*.go] 16 | indent_size = 8 17 | indent_style = tab 18 | 19 | [*.json] 20 | indent_size = 4 21 | indent_style = space 22 | 23 | [Makefile] 24 | indent_style = tab 25 | indent_size = 4 26 | -------------------------------------------------------------------------------- /vendor/github.com/ulule/limiter/v3/.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | .idea 3 | -------------------------------------------------------------------------------- /vendor/github.com/ulule/limiter/v3/AUTHORS: -------------------------------------------------------------------------------- 1 | Primary contributors: 2 | 3 | Gilles FABIO 4 | Florent MESSA 5 | Thomas LE ROUX 6 | -------------------------------------------------------------------------------- /vendor/github.com/ulule/limiter/v3/Makefile: -------------------------------------------------------------------------------- 1 | .PHONY: test lint 2 | 3 | test: 4 | @(scripts/test) 5 | 6 | lint: 7 | @(scripts/lint) 8 | -------------------------------------------------------------------------------- /vendor/github.com/ulule/limiter/v3/defaults.go: -------------------------------------------------------------------------------- 1 | package limiter 2 | 3 | import "time" 4 | 5 | const ( 6 | // DefaultPrefix is the default prefix to use for the key in the store. 7 | DefaultPrefix = "limiter" 8 | 9 | // DefaultMaxRetry is the default maximum number of key retries under 10 | // race condition (mainly used with database-based stores). 11 | DefaultMaxRetry = 3 12 | 13 | // DefaultCleanUpInterval is the default time duration for cleanup. 14 | DefaultCleanUpInterval = 30 * time.Second 15 | ) 16 | -------------------------------------------------------------------------------- /vendor/github.com/ulule/limiter/v3/drivers/store/common/context.go: -------------------------------------------------------------------------------- 1 | package common 2 | 3 | import ( 4 | "time" 5 | 6 | "github.com/ulule/limiter/v3" 7 | ) 8 | 9 | // GetContextFromState generate a new limiter.Context from given state. 10 | func GetContextFromState(now time.Time, rate limiter.Rate, expiration time.Time, count int64) limiter.Context { 11 | limit := rate.Limit 12 | remaining := int64(0) 13 | reached := true 14 | 15 | if count <= limit { 16 | remaining = limit - count 17 | reached = false 18 | } 19 | 20 | reset := expiration.Unix() 21 | 22 | return limiter.Context{ 23 | Limit: limit, 24 | Remaining: remaining, 25 | Reset: reset, 26 | Reached: reached, 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/keccakf_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && !purego && gc 6 | // +build amd64,!purego,gc 7 | 8 | package sha3 9 | 10 | // This function is implemented in keccakf_amd64.s. 11 | 12 | //go:noescape 13 | 14 | func keccakF1600(a *[25]uint64) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/register.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.4 6 | // +build go1.4 7 | 8 | package sha3 9 | 10 | import ( 11 | "crypto" 12 | ) 13 | 14 | func init() { 15 | crypto.RegisterHash(crypto.SHA3_224, New224) 16 | crypto.RegisterHash(crypto.SHA3_256, New256) 17 | crypto.RegisterHash(crypto.SHA3_384, New384) 18 | crypto.RegisterHash(crypto.SHA3_512, New512) 19 | } 20 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/shake_generic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !gc || purego || !s390x 6 | // +build !gc purego !s390x 7 | 8 | package sha3 9 | 10 | // newShake128Asm returns an assembly implementation of SHAKE-128 if available, 11 | // otherwise it returns nil. 12 | func newShake128Asm() ShakeHash { 13 | return nil 14 | } 15 | 16 | // newShake256Asm returns an assembly implementation of SHAKE-256 if available, 17 | // otherwise it returns nil. 18 | func newShake256Asm() ShakeHash { 19 | return nil 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/xor.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (!amd64 && !386 && !ppc64le) || purego 6 | // +build !amd64,!386,!ppc64le purego 7 | 8 | package sha3 9 | 10 | // A storageBuf is an aligned array of maxRate bytes. 11 | type storageBuf [maxRate]byte 12 | 13 | func (b *storageBuf) asBytes() *[maxRate]byte { 14 | return (*[maxRate]byte)(b) 15 | } 16 | 17 | var ( 18 | xorIn = xorInGeneric 19 | copyOut = copyOutGeneric 20 | xorInUnaligned = xorInGeneric 21 | copyOutUnaligned = copyOutGeneric 22 | ) 23 | 24 | const xorImplementationUnaligned = "generic" 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/crypto/sha3/xor_generic.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package sha3 6 | 7 | import "encoding/binary" 8 | 9 | // xorInGeneric xors the bytes in buf into the state; it 10 | // makes no non-portable assumptions about memory layout 11 | // or alignment. 12 | func xorInGeneric(d *state, buf []byte) { 13 | n := len(buf) / 8 14 | 15 | for i := 0; i < n; i++ { 16 | a := binary.LittleEndian.Uint64(buf) 17 | d.a[i] ^= a 18 | buf = buf[8:] 19 | } 20 | } 21 | 22 | // copyOutGeneric copies uint64s to a byte buffer. 23 | func copyOutGeneric(d *state, b []byte) { 24 | for i := 0; len(b) >= 8; i++ { 25 | binary.LittleEndian.PutUint64(b, d.a[i]) 26 | b = b[8:] 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 12 | // 13 | 14 | TEXT ·syscall6(SB),NOSPLIT,$0-88 15 | JMP syscall·syscall6(SB) 16 | 17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSyscall6(SB) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_aix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix 6 | // +build aix 7 | 8 | package cpu 9 | 10 | const ( 11 | // getsystemcfg constants 12 | _SC_IMPL = 2 13 | _IMPL_POWER8 = 0x10000 14 | _IMPL_POWER9 = 0x20000 15 | ) 16 | 17 | func archInit() { 18 | impl := getsystemcfg(_SC_IMPL) 19 | if impl&_IMPL_POWER8 != 0 { 20 | PPC64.IsPOWER8 = true 21 | } 22 | if impl&_IMPL_POWER9 != 0 { 23 | PPC64.IsPOWER8 = true 24 | PPC64.IsPOWER9 = true 25 | } 26 | 27 | Initialized = true 28 | } 29 | 30 | func getsystemcfg(label int) (n uint64) { 31 | r0, _ := callgetsystemcfg(label) 32 | n = uint64(r0) 33 | return 34 | } 35 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // func getisar0() uint64 11 | TEXT ·getisar0(SB),NOSPLIT,$0-8 12 | // get Instruction Set Attributes 0 into x0 13 | // mrs x0, ID_AA64ISAR0_EL1 = d5380600 14 | WORD $0xd5380600 15 | MOVD R0, ret+0(FP) 16 | RET 17 | 18 | // func getisar1() uint64 19 | TEXT ·getisar1(SB),NOSPLIT,$0-8 20 | // get Instruction Set Attributes 1 into x0 21 | // mrs x0, ID_AA64ISAR1_EL1 = d5380620 22 | WORD $0xd5380620 23 | MOVD R0, ret+0(FP) 24 | RET 25 | 26 | // func getpfr0() uint64 27 | TEXT ·getpfr0(SB),NOSPLIT,$0-8 28 | // get Processor Feature Register 0 into x0 29 | // mrs x0, ID_AA64PFR0_EL1 = d5380400 30 | WORD $0xd5380400 31 | MOVD R0, ret+0(FP) 32 | RET 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | package cpu 9 | 10 | func getisar0() uint64 11 | func getisar1() uint64 12 | func getpfr0() uint64 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | package cpu 9 | 10 | // haveAsmFunctions reports whether the other functions in this file can 11 | // be safely called. 12 | func haveAsmFunctions() bool { return true } 13 | 14 | // The following feature detection functions are defined in cpu_s390x.s. 15 | // They are likely to be expensive to call so the results should be cached. 16 | func stfle() facilityList 17 | func kmQuery() queryResult 18 | func kmcQuery() queryResult 19 | func kmctrQuery() queryResult 20 | func kmaQuery() queryResult 21 | func kimdQuery() queryResult 22 | func klmdQuery() queryResult 23 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gc_x86.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (386 || amd64 || amd64p32) && gc 6 | // +build 386 amd64 amd64p32 7 | // +build gc 8 | 9 | package cpu 10 | 11 | // cpuid is implemented in cpu_x86.s for gc compiler 12 | // and in cpu_gccgo.c for gccgo. 13 | func cpuid(eaxArg, ecxArg uint32) (eax, ebx, ecx, edx uint32) 14 | 15 | // xgetbv with ecx = 0 is implemented in cpu_x86.s for gc compiler 16 | // and in cpu_gccgo.c for gccgo. 17 | func xgetbv() (eax, edx uint32) 18 | 19 | // darwinSupportsAVX512 is implemented in cpu_x86.s for gc compiler 20 | // and in cpu_gccgo_x86.go for gccgo. 21 | func darwinSupportsAVX512() bool 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_gccgo_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo 6 | // +build gccgo 7 | 8 | package cpu 9 | 10 | func getisar0() uint64 { return 0 } 11 | func getisar1() uint64 { return 0 } 12 | func getpfr0() uint64 { return 0 } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !386 && !amd64 && !amd64p32 && !arm64 6 | // +build !386,!amd64,!amd64p32,!arm64 7 | 8 | package cpu 9 | 10 | func archInit() { 11 | if err := readHWCAP(); err != nil { 12 | return 13 | } 14 | doinit() 15 | Initialized = true 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && (mips64 || mips64le) 6 | // +build linux 7 | // +build mips64 mips64le 8 | 9 | package cpu 10 | 11 | // HWCAP bits. These are exposed by the Linux kernel 5.4. 12 | const ( 13 | // CPU features 14 | hwcap_MIPS_MSA = 1 << 1 15 | ) 16 | 17 | func doinit() { 18 | // HWCAP feature bits 19 | MIPS64X.HasMSA = isSet(hwCap, hwcap_MIPS_MSA) 20 | } 21 | 22 | func isSet(hwc uint, value uint) bool { 23 | return hwc&value != 0 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_linux_noinit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && !arm && !arm64 && !mips64 && !mips64le && !ppc64 && !ppc64le && !s390x 6 | // +build linux,!arm,!arm64,!mips64,!mips64le,!ppc64,!ppc64le,!s390x 7 | 8 | package cpu 9 | 10 | func doinit() {} 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build mips64 || mips64le 6 | // +build mips64 mips64le 7 | 8 | package cpu 9 | 10 | const cacheLineSize = 32 11 | 12 | func initOptions() { 13 | options = []option{ 14 | {Name: "msa", Feature: &MIPS64X.HasMSA}, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_mipsx.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build mips || mipsle 6 | // +build mips mipsle 7 | 8 | package cpu 9 | 10 | const cacheLineSize = 32 11 | 12 | func initOptions() {} 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && arm 6 | // +build !linux,arm 7 | 8 | package cpu 9 | 10 | func archInit() {} 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && !netbsd && arm64 6 | // +build !linux,!netbsd,arm64 7 | 8 | package cpu 9 | 10 | func doinit() {} 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_other_mips64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !linux && (mips64 || mips64le) 6 | // +build !linux 7 | // +build mips64 mips64le 8 | 9 | package cpu 10 | 11 | func archInit() { 12 | Initialized = true 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_ppc64x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ppc64 || ppc64le 6 | // +build ppc64 ppc64le 7 | 8 | package cpu 9 | 10 | const cacheLineSize = 128 11 | 12 | func initOptions() { 13 | options = []option{ 14 | {Name: "darn", Feature: &PPC64.HasDARN}, 15 | {Name: "scv", Feature: &PPC64.HasSCV}, 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_riscv64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build riscv64 6 | // +build riscv64 7 | 8 | package cpu 9 | 10 | const cacheLineSize = 32 11 | 12 | func initOptions() {} 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_wasm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build wasm 6 | // +build wasm 7 | 8 | package cpu 9 | 10 | // We're compiling the cpu package for an unknown (software-abstracted) CPU. 11 | // Make CacheLinePad an empty struct and hope that the usual struct alignment 12 | // rules are good enough. 13 | 14 | const cacheLineSize = 0 15 | 16 | func initOptions() {} 17 | 18 | func archInit() {} 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_zos.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | func archInit() { 8 | doinit() 9 | Initialized = true 10 | } 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/cpu_zos_s390x.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package cpu 6 | 7 | func initS390Xbase() { 8 | // get the facilities list 9 | facilities := stfle() 10 | 11 | // mandatory 12 | S390X.HasZARCH = facilities.Has(zarch) 13 | S390X.HasSTFLE = facilities.Has(stflef) 14 | S390X.HasLDISP = facilities.Has(ldisp) 15 | S390X.HasEIMM = facilities.Has(eimm) 16 | 17 | // optional 18 | S390X.HasETF3EH = facilities.Has(etf3eh) 19 | S390X.HasDFP = facilities.Has(dfp) 20 | S390X.HasMSA = facilities.Has(msa) 21 | S390X.HasVX = facilities.Has(vx) 22 | if S390X.HasVX { 23 | S390X.HasVXE = facilities.Has(vxe) 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/cpu/syscall_aix_gccgo.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Recreate a getsystemcfg syscall handler instead of 6 | // using the one provided by x/sys/unix to avoid having 7 | // the dependency between them. (See golang.org/issue/32102) 8 | // Morever, this file will be used during the building of 9 | // gccgo's libgo and thus must not used a CGo method. 10 | 11 | //go:build aix && gccgo 12 | // +build aix,gccgo 13 | 14 | package cpu 15 | 16 | import ( 17 | "syscall" 18 | ) 19 | 20 | //extern getsystemcfg 21 | func gccgoGetsystemcfg(label uint32) (r uint64) 22 | 23 | func callgetsystemcfg(label int) (r1 uintptr, e1 syscall.Errno) { 24 | r1 = uintptr(gccgoGetsystemcfg(uint32(label))) 25 | e1 = syscall.GetErrno() 26 | return 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/.gitignore: -------------------------------------------------------------------------------- 1 | _obj/ 2 | unix.test 3 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/aliases.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos) && go1.9 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | // +build go1.9 8 | 9 | package unix 10 | 11 | import "syscall" 12 | 13 | type Signal = syscall.Signal 14 | type Errno = syscall.Errno 15 | type SysProcAttr = syscall.SysProcAttr 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_aix_ppc64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for ppc64, AIX are implemented in runtime/syscall_aix.go 12 | // 13 | 14 | TEXT ·syscall6(SB),NOSPLIT,$0-88 15 | JMP syscall·syscall6(SB) 16 | 17 | TEXT ·rawSyscall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSyscall6(SB) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_386.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | // +build freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for 386 BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || netbsd || openbsd) && gc 6 | // +build darwin dragonfly freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for AMD64 BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (freebsd || netbsd || openbsd) && gc 6 | // +build freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for ARM BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-28 17 | B syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-40 20 | B syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-52 23 | B syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-28 26 | B syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-40 29 | B syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_bsd_arm64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2021 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || freebsd || netbsd || openbsd) && gc 6 | // +build darwin freebsd netbsd openbsd 7 | // +build gc 8 | 9 | #include "textflag.h" 10 | 11 | // System call support for ARM64 BSD 12 | 13 | // Just jump to package syscall's implementation for all these functions. 14 | // The runtime may know about them. 15 | 16 | TEXT ·Syscall(SB),NOSPLIT,$0-56 17 | JMP syscall·Syscall(SB) 18 | 19 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 20 | JMP syscall·Syscall6(SB) 21 | 22 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 23 | JMP syscall·Syscall9(SB) 24 | 25 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 26 | JMP syscall·RawSyscall(SB) 27 | 28 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 29 | JMP syscall·RawSyscall6(SB) 30 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_openbsd_mips64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System call support for mips64, OpenBSD 12 | // 13 | 14 | // Just jump to package syscall's implementation for all these functions. 15 | // The runtime may know about them. 16 | 17 | TEXT ·Syscall(SB),NOSPLIT,$0-56 18 | JMP syscall·Syscall(SB) 19 | 20 | TEXT ·Syscall6(SB),NOSPLIT,$0-80 21 | JMP syscall·Syscall6(SB) 22 | 23 | TEXT ·Syscall9(SB),NOSPLIT,$0-104 24 | JMP syscall·Syscall9(SB) 25 | 26 | TEXT ·RawSyscall(SB),NOSPLIT,$0-56 27 | JMP syscall·RawSyscall(SB) 28 | 29 | TEXT ·RawSyscall6(SB),NOSPLIT,$0-80 30 | JMP syscall·RawSyscall6(SB) 31 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/asm_solaris_amd64.s: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gc 6 | // +build gc 7 | 8 | #include "textflag.h" 9 | 10 | // 11 | // System calls for amd64, Solaris are implemented in runtime/syscall_solaris.go 12 | // 13 | 14 | TEXT ·sysvicall6(SB),NOSPLIT,$0-88 15 | JMP syscall·sysvicall6(SB) 16 | 17 | TEXT ·rawSysvicall6(SB),NOSPLIT,$0-88 18 | JMP syscall·rawSysvicall6(SB) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/bluetooth_linux.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Bluetooth sockets and messages 6 | 7 | package unix 8 | 9 | // Bluetooth Protocols 10 | const ( 11 | BTPROTO_L2CAP = 0 12 | BTPROTO_HCI = 1 13 | BTPROTO_SCO = 2 14 | BTPROTO_RFCOMM = 3 15 | BTPROTO_BNEP = 4 16 | BTPROTO_CMTP = 5 17 | BTPROTO_HIDP = 6 18 | BTPROTO_AVDTP = 7 19 | ) 20 | 21 | const ( 22 | HCI_CHANNEL_RAW = 0 23 | HCI_CHANNEL_USER = 1 24 | HCI_CHANNEL_MONITOR = 2 25 | HCI_CHANNEL_CONTROL = 3 26 | HCI_CHANNEL_LOGGING = 4 27 | ) 28 | 29 | // Socketoption Level 30 | const ( 31 | SOL_BLUETOOTH = 0x112 32 | SOL_HCI = 0x0 33 | SOL_L2CAP = 0x6 34 | SOL_RFCOMM = 0x12 35 | SOL_SCO = 0x11 36 | ) 37 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/constants.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | package unix 9 | 10 | const ( 11 | R_OK = 0x4 12 | W_OK = 0x2 13 | X_OK = 0x1 14 | ) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_aix_ppc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix && ppc 6 | // +build aix,ppc 7 | 8 | // Functions to access/create device major and minor numbers matching the 9 | // encoding used by AIX. 10 | 11 | package unix 12 | 13 | // Major returns the major component of a Linux device number. 14 | func Major(dev uint64) uint32 { 15 | return uint32((dev >> 16) & 0xffff) 16 | } 17 | 18 | // Minor returns the minor component of a Linux device number. 19 | func Minor(dev uint64) uint32 { 20 | return uint32(dev & 0xffff) 21 | } 22 | 23 | // Mkdev returns a Linux device number generated from the given major and minor 24 | // components. 25 | func Mkdev(major, minor uint32) uint64 { 26 | return uint64(((major) << 16) | (minor)) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/dev_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Functions to access/create device major and minor numbers matching the 6 | // encoding used in Darwin's sys/types.h header. 7 | 8 | package unix 9 | 10 | // Major returns the major component of a Darwin device number. 11 | func Major(dev uint64) uint32 { 12 | return uint32((dev >> 24) & 0xff) 13 | } 14 | 15 | // Minor returns the minor component of a Darwin device number. 16 | func Minor(dev uint64) uint32 { 17 | return uint32(dev & 0xffffff) 18 | } 19 | 20 | // Mkdev returns a Darwin device number generated from the given major and minor 21 | // components. 22 | func Mkdev(major, minor uint32) uint64 { 23 | return (uint64(major) << 24) | uint64(minor) 24 | } 25 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_big.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build armbe || arm64be || m68k || mips || mips64 || mips64p32 || ppc || ppc64 || s390 || s390x || shbe || sparc || sparc64 6 | // +build armbe arm64be m68k mips mips64 mips64p32 ppc ppc64 s390 s390x shbe sparc sparc64 7 | 8 | package unix 9 | 10 | const isBigEndian = true 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/endian_little.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | // 5 | //go:build 386 || amd64 || amd64p32 || alpha || arm || arm64 || mipsle || mips64le || mips64p32le || nios2 || ppc64le || riscv || riscv64 || sh 6 | // +build 386 amd64 amd64p32 alpha arm arm64 mipsle mips64le mips64p32le nios2 ppc64le riscv riscv64 sh 7 | 8 | package unix 9 | 10 | const isBigEndian = false 11 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/env_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2010 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris || zos 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris zos 7 | 8 | // Unix environment variables. 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Getenv(key string) (value string, found bool) { 15 | return syscall.Getenv(key) 16 | } 17 | 18 | func Setenv(key, value string) error { 19 | return syscall.Setenv(key, value) 20 | } 21 | 22 | func Clearenv() { 23 | syscall.Clearenv() 24 | } 25 | 26 | func Environ() []string { 27 | return syscall.Environ() 28 | } 29 | 30 | func Unsetenv(key string) error { 31 | return syscall.Unsetenv(key) 32 | } 33 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/errors_freebsd_arm64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Constants that were deprecated or moved to enums in the FreeBSD headers. Keep 6 | // them here for backwards compatibility. 7 | 8 | package unix 9 | 10 | const ( 11 | DLT_HHDLC = 0x79 12 | IPV6_MIN_MEMBERSHIPS = 0x1f 13 | IP_MAX_SOURCE_FILTER = 0x400 14 | IP_MIN_MEMBERSHIPS = 0x1f 15 | RT_CACHING_CONTEXT = 0x1 16 | RT_NORTREF = 0x2 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/fcntl_linux_32bit.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (linux && 386) || (linux && arm) || (linux && mips) || (linux && mipsle) || (linux && ppc) 6 | // +build linux,386 linux,arm linux,mips linux,mipsle linux,ppc 7 | 8 | package unix 9 | 10 | func init() { 11 | // On 32-bit Linux systems, the fcntl syscall that matches Go's 12 | // Flock_t type is SYS_FCNTL64, not SYS_FCNTL. 13 | fcntl64Syscall = SYS_FCNTL64 14 | } 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/gccgo_linux_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build gccgo && linux && amd64 6 | // +build gccgo,linux,amd64 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //extern gettimeofday 13 | func realGettimeofday(*Timeval, *byte) int32 14 | 15 | func gettimeofday(tv *Timeval) (err syscall.Errno) { 16 | r := realGettimeofday(tv, nil) 17 | if r < 0 { 18 | return syscall.GetErrno() 19 | } 20 | return 0 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/pagesize_unix.go: -------------------------------------------------------------------------------- 1 | // Copyright 2017 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | // For Unix, get the pagesize from the runtime. 9 | 10 | package unix 11 | 12 | import "syscall" 13 | 14 | func Getpagesize() int { 15 | return syscall.Getpagesize() 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_darwin.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin && !ios 6 | // +build darwin,!ios 7 | 8 | package unix 9 | 10 | func ptrace(request int, pid int, addr uintptr, data uintptr) error { 11 | return ptrace1(request, pid, addr, data) 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ptrace_ios.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build ios 6 | // +build ios 7 | 8 | package unix 9 | 10 | func ptrace(request int, pid int, addr uintptr, data uintptr) (err error) { 11 | return ENOTSUP 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin && race) || (linux && race) || (freebsd && race) 6 | // +build darwin,race linux,race freebsd,race 7 | 8 | package unix 9 | 10 | import ( 11 | "runtime" 12 | "unsafe" 13 | ) 14 | 15 | const raceenabled = true 16 | 17 | func raceAcquire(addr unsafe.Pointer) { 18 | runtime.RaceAcquire(addr) 19 | } 20 | 21 | func raceReleaseMerge(addr unsafe.Pointer) { 22 | runtime.RaceReleaseMerge(addr) 23 | } 24 | 25 | func raceReadRange(addr unsafe.Pointer, len int) { 26 | runtime.RaceReadRange(addr, len) 27 | } 28 | 29 | func raceWriteRange(addr unsafe.Pointer, len int) { 30 | runtime.RaceWriteRange(addr, len) 31 | } 32 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/race0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2012 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || (darwin && !race) || (linux && !race) || (freebsd && !race) || netbsd || openbsd || solaris || dragonfly || zos 6 | // +build aix darwin,!race linux,!race freebsd,!race netbsd openbsd solaris dragonfly zos 7 | 8 | package unix 9 | 10 | import ( 11 | "unsafe" 12 | ) 13 | 14 | const raceenabled = false 15 | 16 | func raceAcquire(addr unsafe.Pointer) { 17 | } 18 | 19 | func raceReleaseMerge(addr unsafe.Pointer) { 20 | } 21 | 22 | func raceReadRange(addr unsafe.Pointer, len int) { 23 | } 24 | 25 | func raceWriteRange(addr unsafe.Pointer, len int) { 26 | } 27 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdents.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || dragonfly || freebsd || linux || netbsd || openbsd 6 | // +build aix dragonfly freebsd linux netbsd openbsd 7 | 8 | package unix 9 | 10 | // ReadDirent reads directory entries from fd and writes them into buf. 11 | func ReadDirent(fd int, buf []byte) (n int, err error) { 12 | return Getdents(fd, buf) 13 | } 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/readdirent_getdirentries.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build darwin 6 | // +build darwin 7 | 8 | package unix 9 | 10 | import "unsafe" 11 | 12 | // ReadDirent reads directory entries from fd and writes them into buf. 13 | func ReadDirent(fd int, buf []byte) (n int, err error) { 14 | // Final argument is (basep *uintptr) and the syscall doesn't take nil. 15 | // 64 bits should be enough. (32 bits isn't even on 386). Since the 16 | // actual system call is getdirentries64, 64 is a good guess. 17 | // TODO(rsc): Can we use a single global basep for all calls? 18 | var base = (*uintptr)(unsafe.Pointer(new(uint64))) 19 | return Getdirentries(fd, buf, base) 20 | } 21 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/sockcmsg_dragonfly.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package unix 6 | 7 | // Round the length of a raw sockaddr up to align it properly. 8 | func cmsgAlignOf(salen int) int { 9 | salign := SizeofPtr 10 | if SizeofPtr == 8 && !supportsABI(_dragonflyABIChangeVersion) { 11 | // 64-bit Dragonfly before the September 2019 ABI changes still requires 12 | // 32-bit aligned access to network subsystem. 13 | salign = 4 14 | } 15 | return (salen + salign - 1) & ^(salign - 1) 16 | } 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/str.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build aix || darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris 6 | // +build aix darwin dragonfly freebsd linux netbsd openbsd solaris 7 | 8 | package unix 9 | 10 | func itoa(val int) string { // do it here rather than with fmt to avoid dependency 11 | if val < 0 { 12 | return "-" + uitoa(uint(-val)) 13 | } 14 | return uitoa(uint(val)) 15 | } 16 | 17 | func uitoa(val uint) string { 18 | var buf [32]byte // big enough for int64 19 | i := len(buf) - 1 20 | for val >= 10 { 21 | buf[i] = byte(val%10 + '0') 22 | i-- 23 | val /= 10 24 | } 25 | buf[i] = byte(val + '0') 26 | return string(buf[i:]) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_amd64_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && linux && gc 6 | // +build amd64,linux,gc 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | //go:noescape 13 | func gettimeofday(tv *Timeval) (err syscall.Errno) 14 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc 6 | // +build linux,gc 7 | 8 | package unix 9 | 10 | // SyscallNoError may be used instead of Syscall for syscalls that don't fail. 11 | func SyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 12 | 13 | // RawSyscallNoError may be used instead of RawSyscall for syscalls that don't 14 | // fail. 15 | func RawSyscallNoError(trap, a1, a2, a3 uintptr) (r1, r2 uintptr) 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_386.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gc && 386 6 | // +build linux,gc,386 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // Underlying system call writes to newoffset via pointer. 13 | // Implemented in assembly to avoid allocation. 14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 15 | 16 | func socketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 17 | func rawsocketcall(call int, a0, a1, a2, a3, a4, a5 uintptr) (n int, err syscall.Errno) 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gc_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build arm && gc && linux 6 | // +build arm,gc,linux 7 | 8 | package unix 9 | 10 | import "syscall" 11 | 12 | // Underlying system call writes to newoffset via pointer. 13 | // Implemented in assembly to avoid allocation. 14 | func seek(fd int, offset int64, whence int) (newoffset int64, err syscall.Errno) 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_linux_gccgo_arm.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build linux && gccgo && arm 6 | // +build linux,gccgo,arm 7 | 8 | package unix 9 | 10 | import ( 11 | "syscall" 12 | "unsafe" 13 | ) 14 | 15 | func seek(fd int, offset int64, whence int) (int64, syscall.Errno) { 16 | var newoffset int64 17 | offsetLow := uint32(offset & 0xffffffff) 18 | offsetHigh := uint32((offset >> 32) & 0xffffffff) 19 | _, _, err := Syscall6(SYS__LLSEEK, uintptr(fd), uintptr(offsetHigh), uintptr(offsetLow), uintptr(unsafe.Pointer(&newoffset)), uintptr(whence), 0) 20 | return newoffset, err 21 | } 22 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_solaris_amd64.go: -------------------------------------------------------------------------------- 1 | // Copyright 2009 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build amd64 && solaris 6 | // +build amd64,solaris 7 | 8 | package unix 9 | 10 | func setTimespec(sec, nsec int64) Timespec { 11 | return Timespec{Sec: sec, Nsec: nsec} 12 | } 13 | 14 | func setTimeval(sec, usec int64) Timeval { 15 | return Timeval{Sec: sec, Usec: usec} 16 | } 17 | 18 | func (iov *Iovec) SetLen(length int) { 19 | iov.Len = uint64(length) 20 | } 21 | 22 | func (msghdr *Msghdr) SetIovlen(length int) { 23 | msghdr.Iovlen = int32(length) 24 | } 25 | 26 | func (cmsg *Cmsghdr) SetLen(length int) { 27 | cmsg.Len = uint32(length) 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/syscall_unix_gc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build (darwin || dragonfly || freebsd || linux || netbsd || openbsd || solaris) && gc && !ppc64le && !ppc64 6 | // +build darwin dragonfly freebsd linux netbsd openbsd solaris 7 | // +build gc 8 | // +build !ppc64le 9 | // +build !ppc64 10 | 11 | package unix 12 | 13 | import "syscall" 14 | 15 | func Syscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 16 | func Syscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 17 | func RawSyscall(trap, a1, a2, a3 uintptr) (r1, r2 uintptr, err syscall.Errno) 18 | func RawSyscall6(trap, a1, a2, a3, a4, a5, a6 uintptr) (r1, r2 uintptr, err syscall.Errno) 19 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zptrace_linux_arm64.go: -------------------------------------------------------------------------------- 1 | // Code generated by linux/mkall.go generatePtraceRegSet("arm64"). DO NOT EDIT. 2 | 3 | package unix 4 | 5 | import "unsafe" 6 | 7 | // PtraceGetRegSetArm64 fetches the registers used by arm64 binaries. 8 | func PtraceGetRegSetArm64(pid, addr int, regsout *PtraceRegsArm64) error { 9 | iovec := Iovec{(*byte)(unsafe.Pointer(regsout)), uint64(unsafe.Sizeof(*regsout))} 10 | return ptrace(PTRACE_GETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 11 | } 12 | 13 | // PtraceSetRegSetArm64 sets the registers used by arm64 binaries. 14 | func PtraceSetRegSetArm64(pid, addr int, regs *PtraceRegsArm64) error { 15 | iovec := Iovec{(*byte)(unsafe.Pointer(regs)), uint64(unsafe.Sizeof(*regs))} 16 | return ptrace(PTRACE_SETREGSET, pid, uintptr(addr), uintptr(unsafe.Pointer(&iovec))) 17 | } 18 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_amd64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go amd64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | 9 | TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0 10 | JMP libc_fdopendir(SB) 11 | 12 | GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8 13 | DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB) 14 | 15 | TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0 16 | JMP libc_closedir(SB) 17 | 18 | GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8 19 | DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB) 20 | 21 | TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0 22 | JMP libc_readdir_r(SB) 23 | 24 | GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8 25 | DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/zsyscall_darwin_arm64.1_13.s: -------------------------------------------------------------------------------- 1 | // go run mkasm_darwin.go arm64 2 | // Code generated by the command above; DO NOT EDIT. 3 | 4 | //go:build go1.13 5 | // +build go1.13 6 | 7 | #include "textflag.h" 8 | 9 | TEXT libc_fdopendir_trampoline<>(SB),NOSPLIT,$0-0 10 | JMP libc_fdopendir(SB) 11 | 12 | GLOBL ·libc_fdopendir_trampoline_addr(SB), RODATA, $8 13 | DATA ·libc_fdopendir_trampoline_addr(SB)/8, $libc_fdopendir_trampoline<>(SB) 14 | 15 | TEXT libc_closedir_trampoline<>(SB),NOSPLIT,$0-0 16 | JMP libc_closedir(SB) 17 | 18 | GLOBL ·libc_closedir_trampoline_addr(SB), RODATA, $8 19 | DATA ·libc_closedir_trampoline_addr(SB)/8, $libc_closedir_trampoline<>(SB) 20 | 21 | TEXT libc_readdir_r_trampoline<>(SB),NOSPLIT,$0-0 22 | JMP libc_readdir_r(SB) 23 | 24 | GLOBL ·libc_readdir_r_trampoline_addr(SB), RODATA, $8 25 | DATA ·libc_readdir_r_trampoline_addr(SB)/8, $libc_readdir_r_trampoline<>(SB) 26 | -------------------------------------------------------------------------------- /vendor/golang.org/x/sys/unix/ztypes_illumos_amd64.go: -------------------------------------------------------------------------------- 1 | // cgo -godefs types_illumos.go | go run mkpost.go 2 | // Code generated by the command above; see README.md. DO NOT EDIT. 3 | 4 | //go:build amd64 && illumos 5 | // +build amd64,illumos 6 | 7 | package unix 8 | 9 | const ( 10 | TUNNEWPPA = 0x540001 11 | TUNSETPPA = 0x540002 12 | 13 | I_STR = 0x5308 14 | I_POP = 0x5303 15 | I_PUSH = 0x5302 16 | I_PLINK = 0x5316 17 | I_PUNLINK = 0x5317 18 | 19 | IF_UNITSEL = -0x7ffb8cca 20 | ) 21 | 22 | type strbuf struct { 23 | Maxlen int32 24 | Len int32 25 | Buf *int8 26 | } 27 | 28 | type Strioctl struct { 29 | Cmd int32 30 | Timout int32 31 | Len int32 32 | Dp *int8 33 | } 34 | 35 | type Lifreq struct { 36 | Name [32]int8 37 | Lifru1 [4]byte 38 | Type uint32 39 | Lifru [336]byte 40 | } 41 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at http://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at http://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/language/common.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package language 4 | 5 | // This file contains code common to the maketables.go and the package code. 6 | 7 | // AliasType is the type of an alias in AliasMap. 8 | type AliasType int8 9 | 10 | const ( 11 | Deprecated AliasType = iota 12 | Macro 13 | Legacy 14 | 15 | AliasTypeUnknown AliasType = -1 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/internal/language/coverage.go: -------------------------------------------------------------------------------- 1 | // Copyright 2014 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package language 6 | 7 | // BaseLanguages returns the list of all supported base languages. It generates 8 | // the list by traversing the internal structures. 9 | func BaseLanguages() []Language { 10 | base := make([]Language, 0, NumLanguages) 11 | for i := 0; i < langNoIndexOffset; i++ { 12 | // We included "und" already for the value 0. 13 | if i != nonCanonicalUnd { 14 | base = append(base, Language(i)) 15 | } 16 | } 17 | i := langNoIndexOffset 18 | for _, v := range langNoIndex { 19 | for k := 0; k < 8; k++ { 20 | if v&1 == 1 { 21 | base = append(base, Language(i)) 22 | } 23 | v >>= 1 24 | i++ 25 | } 26 | } 27 | return base 28 | } 29 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_1.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.2 6 | // +build !go1.2 7 | 8 | package language 9 | 10 | import "sort" 11 | 12 | func sortStable(s sort.Interface) { 13 | ss := stableSort{ 14 | s: s, 15 | pos: make([]int, s.Len()), 16 | } 17 | for i := range ss.pos { 18 | ss.pos[i] = i 19 | } 20 | sort.Sort(&ss) 21 | } 22 | 23 | type stableSort struct { 24 | s sort.Interface 25 | pos []int 26 | } 27 | 28 | func (s *stableSort) Len() int { 29 | return len(s.pos) 30 | } 31 | 32 | func (s *stableSort) Less(i, j int) bool { 33 | return s.s.Less(i, j) || !s.s.Less(j, i) && s.pos[i] < s.pos[j] 34 | } 35 | 36 | func (s *stableSort) Swap(i, j int) { 37 | s.s.Swap(i, j) 38 | s.pos[i], s.pos[j] = s.pos[j], s.pos[i] 39 | } 40 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/language/go1_2.go: -------------------------------------------------------------------------------- 1 | // Copyright 2013 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.2 6 | // +build go1.2 7 | 8 | package language 9 | 10 | import "sort" 11 | 12 | var sortStable = sort.Stable 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule10.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build go1.10 6 | // +build go1.10 7 | 8 | package bidirule 9 | 10 | func (t *Transformer) isFinal() bool { 11 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 12 | } 13 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/bidirule/bidirule9.0.0.go: -------------------------------------------------------------------------------- 1 | // Copyright 2016 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | //go:build !go1.10 6 | // +build !go1.10 7 | 8 | package bidirule 9 | 10 | func (t *Transformer) isFinal() bool { 11 | if !t.isRTL() { 12 | return true 13 | } 14 | return t.state == ruleLTRFinal || t.state == ruleRTLFinal || t.state == ruleInitial 15 | } 16 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/secure/precis/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2015 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package precis contains types and functions for the preparation, 6 | // enforcement, and comparison of internationalized strings ("PRECIS") as 7 | // defined in RFC 8264. It also contains several pre-defined profiles for 8 | // passwords, nicknames, and usernames as defined in RFC 8265 and RFC 8266. 9 | // 10 | // BE ADVISED: This package is under construction and the API may change in 11 | // backwards incompatible ways and without notice. 12 | package precis // import "golang.org/x/text/secure/precis" 13 | 14 | //go:generate go run gen.go gen_trieval.go 15 | -------------------------------------------------------------------------------- /vendor/golang.org/x/text/width/trieval.go: -------------------------------------------------------------------------------- 1 | // Code generated by running "go generate" in golang.org/x/text. DO NOT EDIT. 2 | 3 | package width 4 | 5 | // elem is an entry of the width trie. The high byte is used to encode the type 6 | // of the rune. The low byte is used to store the index to a mapping entry in 7 | // the inverseData array. 8 | type elem uint16 9 | 10 | const ( 11 | tagNeutral elem = iota << typeShift 12 | tagAmbiguous 13 | tagWide 14 | tagNarrow 15 | tagFullwidth 16 | tagHalfwidth 17 | ) 18 | 19 | const ( 20 | numTypeBits = 3 21 | typeShift = 16 - numTypeBits 22 | 23 | // tagNeedsFold is true for all fullwidth and halfwidth runes except for 24 | // the Won sign U+20A9. 25 | tagNeedsFold = 0x1000 26 | 27 | // The Korean Won sign is halfwidth, but SHOULD NOT be mapped to a wide 28 | // variant. 29 | wonSign rune = 0x20A9 30 | ) 31 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/AUTHORS: -------------------------------------------------------------------------------- 1 | # This source code refers to The Go Authors for copyright purposes. 2 | # The master list of authors is in the main Go distribution, 3 | # visible at https://tip.golang.org/AUTHORS. 4 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/CONTRIBUTORS: -------------------------------------------------------------------------------- 1 | # This source code was written by the Go contributors. 2 | # The master list of contributors is in the main Go distribution, 3 | # visible at https://tip.golang.org/CONTRIBUTORS. 4 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/encoding/prototext/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package prototext marshals and unmarshals protocol buffer messages as the 6 | // textproto format. 7 | package prototext 8 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/errors/is_go113.go: -------------------------------------------------------------------------------- 1 | // Copyright 2020 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.13 6 | 7 | package errors 8 | 9 | import "errors" 10 | 11 | // Is is errors.Is. 12 | func Is(err, target error) bool { return errors.Is(err, target) } 13 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_disable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !protolegacy 6 | 7 | package flags 8 | 9 | const protoLegacy = false 10 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/flags/proto_legacy_enable.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build protolegacy 6 | 7 | package flags 8 | 9 | const protoLegacy = true 10 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/doc.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Package genid contains constants for declarations in descriptor.proto 6 | // and the well-known types. 7 | package genid 8 | 9 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 10 | 11 | const GoogleProtobuf_package protoreflect.FullName = "google.protobuf" 12 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/empty_gen.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // Code generated by generate-protos. DO NOT EDIT. 6 | 7 | package genid 8 | 9 | import ( 10 | protoreflect "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | const File_google_protobuf_empty_proto = "google/protobuf/empty.proto" 14 | 15 | // Names for google.protobuf.Empty. 16 | const ( 17 | Empty_message_name protoreflect.Name = "Empty" 18 | Empty_message_fullname protoreflect.FullName = "google.protobuf.Empty" 19 | ) 20 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/goname.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | // Go names of implementation-specific struct fields in generated messages. 8 | const ( 9 | State_goname = "state" 10 | 11 | SizeCache_goname = "sizeCache" 12 | SizeCacheA_goname = "XXX_sizecache" 13 | 14 | WeakFields_goname = "weakFields" 15 | WeakFieldsA_goname = "XXX_weak" 16 | 17 | UnknownFields_goname = "unknownFields" 18 | UnknownFieldsA_goname = "XXX_unrecognized" 19 | 20 | ExtensionFields_goname = "extensionFields" 21 | ExtensionFieldsA_goname = "XXX_InternalExtensions" 22 | ExtensionFieldsB_goname = "XXX_extensions" 23 | 24 | WeakFieldPrefix_goname = "XXX_weak_" 25 | ) 26 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/map_entry.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field names and numbers for synthetic map entry messages. 10 | const ( 11 | MapEntry_Key_field_name protoreflect.Name = "key" 12 | MapEntry_Value_field_name protoreflect.Name = "value" 13 | 14 | MapEntry_Key_field_number protoreflect.FieldNumber = 1 15 | MapEntry_Value_field_number protoreflect.FieldNumber = 2 16 | ) 17 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/genid/wrappers.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package genid 6 | 7 | import protoreflect "google.golang.org/protobuf/reflect/protoreflect" 8 | 9 | // Generic field name and number for messages in wrappers.proto. 10 | const ( 11 | WrapperValue_Value_field_name protoreflect.Name = "value" 12 | WrapperValue_Value_field_number protoreflect.FieldNumber = 1 13 | ) 14 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_map_go112.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build go1.12 6 | 7 | package impl 8 | 9 | import "reflect" 10 | 11 | func mapRange(v reflect.Value) *reflect.MapIter { return v.MapRange() } 12 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/codec_unsafe.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build !purego,!appengine 6 | 7 | package impl 8 | 9 | // When using unsafe pointers, we can just treat enum values as int32s. 10 | 11 | var ( 12 | coderEnumNoZero = coderInt32NoZero 13 | coderEnum = coderInt32 14 | coderEnumPtr = coderInt32Ptr 15 | coderEnumSlice = coderInt32Slice 16 | coderEnumPackedSlice = coderInt32PackedSlice 17 | ) 18 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/impl/enum.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package impl 6 | 7 | import ( 8 | "reflect" 9 | 10 | pref "google.golang.org/protobuf/reflect/protoreflect" 11 | ) 12 | 13 | type EnumInfo struct { 14 | GoReflectType reflect.Type // int32 kind 15 | Desc pref.EnumDescriptor 16 | } 17 | 18 | func (t *EnumInfo) New(n pref.EnumNumber) pref.Enum { 19 | return reflect.ValueOf(n).Convert(t.GoReflectType).Interface().(pref.Enum) 20 | } 21 | func (t *EnumInfo) Descriptor() pref.EnumDescriptor { return t.Desc } 22 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/internal/strs/strings_pure.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // +build purego appengine 6 | 7 | package strs 8 | 9 | import pref "google.golang.org/protobuf/reflect/protoreflect" 10 | 11 | func UnsafeString(b []byte) string { 12 | return string(b) 13 | } 14 | 15 | func UnsafeBytes(s string) []byte { 16 | return []byte(s) 17 | } 18 | 19 | type Builder struct{} 20 | 21 | func (*Builder) AppendFullName(prefix pref.FullName, name pref.Name) pref.FullName { 22 | return prefix.Append(name) 23 | } 24 | 25 | func (*Builder) MakeString(b []byte) string { 26 | return string(b) 27 | } 28 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_methods.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The protoreflect build tag disables use of fast-path methods. 6 | // +build !protoreflect 7 | 8 | package proto 9 | 10 | import ( 11 | "google.golang.org/protobuf/reflect/protoreflect" 12 | "google.golang.org/protobuf/runtime/protoiface" 13 | ) 14 | 15 | const hasProtoMethods = true 16 | 17 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 18 | return m.ProtoMethods() 19 | } 20 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/proto/proto_reflect.go: -------------------------------------------------------------------------------- 1 | // Copyright 2019 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | // The protoreflect build tag disables use of fast-path methods. 6 | // +build protoreflect 7 | 8 | package proto 9 | 10 | import ( 11 | "google.golang.org/protobuf/reflect/protoreflect" 12 | "google.golang.org/protobuf/runtime/protoiface" 13 | ) 14 | 15 | const hasProtoMethods = false 16 | 17 | func protoMethods(m protoreflect.Message) *protoiface.Methods { 18 | return nil 19 | } 20 | -------------------------------------------------------------------------------- /vendor/google.golang.org/protobuf/runtime/protoiface/legacy.go: -------------------------------------------------------------------------------- 1 | // Copyright 2018 The Go Authors. All rights reserved. 2 | // Use of this source code is governed by a BSD-style 3 | // license that can be found in the LICENSE file. 4 | 5 | package protoiface 6 | 7 | type MessageV1 interface { 8 | Reset() 9 | String() string 10 | ProtoMessage() 11 | } 12 | 13 | type ExtensionRangeV1 struct { 14 | Start, End int32 // both inclusive 15 | } 16 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/.travis.yml: -------------------------------------------------------------------------------- 1 | language: go 2 | 3 | go: 4 | - "1.4.x" 5 | - "1.5.x" 6 | - "1.6.x" 7 | - "1.7.x" 8 | - "1.8.x" 9 | - "1.9.x" 10 | - "1.10.x" 11 | - "1.11.x" 12 | - "1.12.x" 13 | - "1.13.x" 14 | - "1.14.x" 15 | - "tip" 16 | 17 | go_import_path: gopkg.in/yaml.v2 18 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/NOTICE: -------------------------------------------------------------------------------- 1 | Copyright 2011-2016 Canonical Ltd. 2 | 3 | Licensed under the Apache License, Version 2.0 (the "License"); 4 | you may not use this file except in compliance with the License. 5 | You may obtain a copy of the License at 6 | 7 | http://www.apache.org/licenses/LICENSE-2.0 8 | 9 | Unless required by applicable law or agreed to in writing, software 10 | distributed under the License is distributed on an "AS IS" BASIS, 11 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 12 | See the License for the specific language governing permissions and 13 | limitations under the License. 14 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/go.mod: -------------------------------------------------------------------------------- 1 | module gopkg.in/yaml.v2 2 | 3 | go 1.15 4 | 5 | require gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405 6 | -------------------------------------------------------------------------------- /vendor/gopkg.in/yaml.v2/writerc.go: -------------------------------------------------------------------------------- 1 | package yaml 2 | 3 | // Set the writer error and return false. 4 | func yaml_emitter_set_writer_error(emitter *yaml_emitter_t, problem string) bool { 5 | emitter.error = yaml_WRITER_ERROR 6 | emitter.problem = problem 7 | return false 8 | } 9 | 10 | // Flush the output buffer. 11 | func yaml_emitter_flush(emitter *yaml_emitter_t) bool { 12 | if emitter.write_handler == nil { 13 | panic("write handler not set") 14 | } 15 | 16 | // Check if the buffer is empty. 17 | if emitter.buffer_pos == 0 { 18 | return true 19 | } 20 | 21 | if err := emitter.write_handler(emitter, emitter.buffer[:emitter.buffer_pos]); err != nil { 22 | return yaml_emitter_set_writer_error(emitter, "write error: "+err.Error()) 23 | } 24 | emitter.buffer_pos = 0 25 | return true 26 | } 27 | -------------------------------------------------------------------------------- /vendor/gorm.io/driver/mysql/go.mod: -------------------------------------------------------------------------------- 1 | module gorm.io/driver/mysql 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/go-sql-driver/mysql v1.6.0 7 | gorm.io/gorm v1.22.4 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/gorm.io/driver/mysql/go.sum: -------------------------------------------------------------------------------- 1 | github.com/go-sql-driver/mysql v1.6.0 h1:BCTh4TKNUYmOmMUcQ3IipzF5prigylS7XXjEkfCHuOE= 2 | github.com/go-sql-driver/mysql v1.6.0/go.mod h1:DCzpHaOWr8IXmIStZouvnhqoel9Qv2LBy8hT2VhHyBg= 3 | github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= 4 | github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= 5 | github.com/jinzhu/now v1.1.3 h1:PlHq1bSCSZL9K0wUhbm2pGLoTWs2GwVhsP6emvGV/ZI= 6 | github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= 7 | gorm.io/gorm v1.22.4 h1:8aPcyEJhY0MAt8aY6Dc524Pn+pO29K+ydu+e/cXSpQM= 8 | gorm.io/gorm v1.22.4/go.mod h1:1aeVC+pe9ZmvKZban/gW4QPra7PRoTEssyc922qCAkk= 9 | -------------------------------------------------------------------------------- /vendor/gorm.io/driver/postgres/go.mod: -------------------------------------------------------------------------------- 1 | module gorm.io/driver/postgres 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/jackc/pgx/v4 v4.14.0 7 | golang.org/x/crypto v0.0.0-20210921155107-089bfa567519 // indirect 8 | golang.org/x/text v0.3.7 // indirect 9 | gorm.io/gorm v1.22.3 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/gorm.io/driver/sqlite/README.md: -------------------------------------------------------------------------------- 1 | # GORM Sqlite Driver 2 | 3 | ![CI](https://github.com/go-gorm/sqlite/workflows/CI/badge.svg) 4 | 5 | ## USAGE 6 | 7 | ```go 8 | import ( 9 | "gorm.io/driver/sqlite" 10 | "gorm.io/gorm" 11 | ) 12 | 13 | // github.com/mattn/go-sqlite3 14 | db, err := gorm.Open(sqlite.Open("gorm.db"), &gorm.Config{}) 15 | ``` 16 | 17 | Checkout [https://gorm.io](https://gorm.io) for details. 18 | -------------------------------------------------------------------------------- /vendor/gorm.io/driver/sqlite/errors.go: -------------------------------------------------------------------------------- 1 | package sqlite 2 | 3 | import "errors" 4 | 5 | var ( 6 | ErrConstraintsNotImplemented = errors.New("constraints not implemented on sqlite, consider using DisableForeignKeyConstraintWhenMigrating, more details https://github.com/go-gorm/gorm/wiki/GORM-V2-Release-Note-Draft#all-new-migrator") 7 | ) 8 | -------------------------------------------------------------------------------- /vendor/gorm.io/driver/sqlite/go.mod: -------------------------------------------------------------------------------- 1 | module gorm.io/driver/sqlite 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/davecgh/go-spew v1.1.1 // indirect 7 | github.com/mattn/go-sqlite3 v1.14.9 8 | github.com/stretchr/testify v1.7.0 9 | gorm.io/gorm v1.22.3 10 | ) 11 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/.gitignore: -------------------------------------------------------------------------------- 1 | TODO* 2 | documents 3 | coverage.txt 4 | _book 5 | .idea 6 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/callbacks/callmethod.go: -------------------------------------------------------------------------------- 1 | package callbacks 2 | 3 | import ( 4 | "reflect" 5 | 6 | "gorm.io/gorm" 7 | ) 8 | 9 | func callMethod(db *gorm.DB, fc func(value interface{}, tx *gorm.DB) bool) { 10 | tx := db.Session(&gorm.Session{NewDB: true}) 11 | if called := fc(db.Statement.ReflectValue.Interface(), tx); !called { 12 | switch db.Statement.ReflectValue.Kind() { 13 | case reflect.Slice, reflect.Array: 14 | db.Statement.CurDestIndex = 0 15 | for i := 0; i < db.Statement.ReflectValue.Len(); i++ { 16 | fc(reflect.Indirect(db.Statement.ReflectValue.Index(i)).Addr().Interface(), tx) 17 | db.Statement.CurDestIndex++ 18 | } 19 | case reflect.Struct: 20 | fc(db.Statement.ReflectValue.Addr().Interface(), tx) 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/callbacks/interfaces.go: -------------------------------------------------------------------------------- 1 | package callbacks 2 | 3 | import "gorm.io/gorm" 4 | 5 | type BeforeCreateInterface interface { 6 | BeforeCreate(*gorm.DB) error 7 | } 8 | 9 | type AfterCreateInterface interface { 10 | AfterCreate(*gorm.DB) error 11 | } 12 | 13 | type BeforeUpdateInterface interface { 14 | BeforeUpdate(*gorm.DB) error 15 | } 16 | 17 | type AfterUpdateInterface interface { 18 | AfterUpdate(*gorm.DB) error 19 | } 20 | 21 | type BeforeSaveInterface interface { 22 | BeforeSave(*gorm.DB) error 23 | } 24 | 25 | type AfterSaveInterface interface { 26 | AfterSave(*gorm.DB) error 27 | } 28 | 29 | type BeforeDeleteInterface interface { 30 | BeforeDelete(*gorm.DB) error 31 | } 32 | 33 | type AfterDeleteInterface interface { 34 | AfterDelete(*gorm.DB) error 35 | } 36 | 37 | type AfterFindInterface interface { 38 | AfterFind(*gorm.DB) error 39 | } 40 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/callbacks/raw.go: -------------------------------------------------------------------------------- 1 | package callbacks 2 | 3 | import ( 4 | "gorm.io/gorm" 5 | ) 6 | 7 | func RawExec(db *gorm.DB) { 8 | if db.Error == nil && !db.DryRun { 9 | result, err := db.Statement.ConnPool.ExecContext(db.Statement.Context, db.Statement.SQL.String(), db.Statement.Vars...) 10 | if err != nil { 11 | db.AddError(err) 12 | return 13 | } 14 | 15 | db.RowsAffected, _ = result.RowsAffected() 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/callbacks/row.go: -------------------------------------------------------------------------------- 1 | package callbacks 2 | 3 | import ( 4 | "gorm.io/gorm" 5 | ) 6 | 7 | func RowQuery(db *gorm.DB) { 8 | if db.Error == nil { 9 | BuildQuerySQL(db) 10 | if db.DryRun { 11 | return 12 | } 13 | 14 | if isRows, ok := db.Get("rows"); ok && isRows.(bool) { 15 | db.Statement.Settings.Delete("rows") 16 | db.Statement.Dest, db.Error = db.Statement.ConnPool.QueryContext(db.Statement.Context, db.Statement.SQL.String(), db.Statement.Vars...) 17 | } else { 18 | db.Statement.Dest = db.Statement.ConnPool.QueryRowContext(db.Statement.Context, db.Statement.SQL.String(), db.Statement.Vars...) 19 | } 20 | 21 | db.RowsAffected = -1 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/callbacks/transaction.go: -------------------------------------------------------------------------------- 1 | package callbacks 2 | 3 | import ( 4 | "gorm.io/gorm" 5 | ) 6 | 7 | func BeginTransaction(db *gorm.DB) { 8 | if !db.Config.SkipDefaultTransaction && db.Error == nil { 9 | if tx := db.Begin(); tx.Error == nil { 10 | db.Statement.ConnPool = tx.Statement.ConnPool 11 | db.InstanceSet("gorm:started_transaction", true) 12 | } else if tx.Error == gorm.ErrInvalidTransaction { 13 | tx.Error = nil 14 | } else { 15 | db.Error = tx.Error 16 | } 17 | } 18 | } 19 | 20 | func CommitOrRollbackTransaction(db *gorm.DB) { 21 | if !db.Config.SkipDefaultTransaction { 22 | if _, ok := db.InstanceGet("gorm:started_transaction"); ok { 23 | if db.Error != nil { 24 | db.Rollback() 25 | } else { 26 | db.Commit() 27 | } 28 | 29 | db.Statement.ConnPool = db.ConnPool 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/clause/delete.go: -------------------------------------------------------------------------------- 1 | package clause 2 | 3 | type Delete struct { 4 | Modifier string 5 | } 6 | 7 | func (d Delete) Name() string { 8 | return "DELETE" 9 | } 10 | 11 | func (d Delete) Build(builder Builder) { 12 | builder.WriteString("DELETE") 13 | 14 | if d.Modifier != "" { 15 | builder.WriteByte(' ') 16 | builder.WriteString(d.Modifier) 17 | } 18 | } 19 | 20 | func (d Delete) MergeClause(clause *Clause) { 21 | clause.Name = "" 22 | clause.Expression = d 23 | } 24 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/clause/from.go: -------------------------------------------------------------------------------- 1 | package clause 2 | 3 | // From from clause 4 | type From struct { 5 | Tables []Table 6 | Joins []Join 7 | } 8 | 9 | // Name from clause name 10 | func (from From) Name() string { 11 | return "FROM" 12 | } 13 | 14 | // Build build from clause 15 | func (from From) Build(builder Builder) { 16 | if len(from.Tables) > 0 { 17 | for idx, table := range from.Tables { 18 | if idx > 0 { 19 | builder.WriteByte(',') 20 | } 21 | 22 | builder.WriteQuoted(table) 23 | } 24 | } else { 25 | builder.WriteQuoted(currentTable) 26 | } 27 | 28 | for _, join := range from.Joins { 29 | builder.WriteByte(' ') 30 | join.Build(builder) 31 | } 32 | } 33 | 34 | // MergeClause merge from clause 35 | func (from From) MergeClause(clause *Clause) { 36 | clause.Expression = from 37 | } 38 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/clause/locking.go: -------------------------------------------------------------------------------- 1 | package clause 2 | 3 | type Locking struct { 4 | Strength string 5 | Table Table 6 | Options string 7 | } 8 | 9 | // Name where clause name 10 | func (locking Locking) Name() string { 11 | return "FOR" 12 | } 13 | 14 | // Build build where clause 15 | func (locking Locking) Build(builder Builder) { 16 | builder.WriteString(locking.Strength) 17 | if locking.Table.Name != "" { 18 | builder.WriteString(" OF ") 19 | builder.WriteQuoted(locking.Table) 20 | } 21 | 22 | if locking.Options != "" { 23 | builder.WriteByte(' ') 24 | builder.WriteString(locking.Options) 25 | } 26 | } 27 | 28 | // MergeClause merge order by clauses 29 | func (locking Locking) MergeClause(clause *Clause) { 30 | clause.Expression = locking 31 | } 32 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/clause/returning.go: -------------------------------------------------------------------------------- 1 | package clause 2 | 3 | type Returning struct { 4 | Columns []Column 5 | } 6 | 7 | // Name where clause name 8 | func (returning Returning) Name() string { 9 | return "RETURNING" 10 | } 11 | 12 | // Build build where clause 13 | func (returning Returning) Build(builder Builder) { 14 | if len(returning.Columns) > 0 { 15 | for idx, column := range returning.Columns { 16 | if idx > 0 { 17 | builder.WriteByte(',') 18 | } 19 | 20 | builder.WriteQuoted(column) 21 | } 22 | } else { 23 | builder.WriteByte('*') 24 | } 25 | } 26 | 27 | // MergeClause merge order by clauses 28 | func (returning Returning) MergeClause(clause *Clause) { 29 | if v, ok := clause.Expression.(Returning); ok { 30 | returning.Columns = append(v.Columns, returning.Columns...) 31 | } 32 | 33 | clause.Expression = returning 34 | } 35 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/clause/with.go: -------------------------------------------------------------------------------- 1 | package clause 2 | 3 | type With struct { 4 | } 5 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/go.mod: -------------------------------------------------------------------------------- 1 | module gorm.io/gorm 2 | 3 | go 1.14 4 | 5 | require ( 6 | github.com/jinzhu/inflection v1.0.0 7 | github.com/jinzhu/now v1.1.3 8 | ) 9 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/go.sum: -------------------------------------------------------------------------------- 1 | github.com/jinzhu/inflection v1.0.0 h1:K317FqzuhWc8YvSVlFMCCUb36O/S9MCKRDI7QkRKD/E= 2 | github.com/jinzhu/inflection v1.0.0/go.mod h1:h+uFLlag+Qp1Va5pdKtLDYj+kHp5pxUVkryuEj+Srlc= 3 | github.com/jinzhu/now v1.1.3 h1:PlHq1bSCSZL9K0wUhbm2pGLoTWs2GwVhsP6emvGV/ZI= 4 | github.com/jinzhu/now v1.1.3/go.mod h1:d3SSVoowX0Lcu0IBviAWJpolVfI5UJVZZ7cO71lE/z8= 5 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/model.go: -------------------------------------------------------------------------------- 1 | package gorm 2 | 3 | import "time" 4 | 5 | // Model a basic GoLang struct which includes the following fields: ID, CreatedAt, UpdatedAt, DeletedAt 6 | // It may be embedded into your model or you may build your own model without it 7 | // type User struct { 8 | // gorm.Model 9 | // } 10 | type Model struct { 11 | ID uint `gorm:"primarykey"` 12 | CreatedAt time.Time 13 | UpdatedAt time.Time 14 | DeletedAt DeletedAt `gorm:"index"` 15 | } 16 | -------------------------------------------------------------------------------- /vendor/gorm.io/gorm/schema/interfaces.go: -------------------------------------------------------------------------------- 1 | package schema 2 | 3 | import ( 4 | "gorm.io/gorm/clause" 5 | ) 6 | 7 | type GormDataTypeInterface interface { 8 | GormDataType() string 9 | } 10 | 11 | type CreateClausesInterface interface { 12 | CreateClauses(*Field) []clause.Interface 13 | } 14 | 15 | type QueryClausesInterface interface { 16 | QueryClauses(*Field) []clause.Interface 17 | } 18 | 19 | type UpdateClausesInterface interface { 20 | UpdateClauses(*Field) []clause.Interface 21 | } 22 | 23 | type DeleteClausesInterface interface { 24 | DeleteClauses(*Field) []clause.Interface 25 | } 26 | --------------------------------------------------------------------------------