Merge b1dc2b618d
into 823f93f556
This commit is contained in:
commit
be939d5b0b
|
@ -0,0 +1,534 @@
|
||||||
|
root = true
|
||||||
|
|
||||||
|
[*]
|
||||||
|
charset = utf-8
|
||||||
|
end_of_line = lf
|
||||||
|
indent_size = 2
|
||||||
|
indent_style = space
|
||||||
|
insert_final_newline = false
|
||||||
|
max_line_length = 120
|
||||||
|
tab_width = 2
|
||||||
|
ij_continuation_indent_size = 4
|
||||||
|
ij_formatter_off_tag = @formatter:off
|
||||||
|
ij_formatter_on_tag = @formatter:on
|
||||||
|
ij_formatter_tags_enabled = true
|
||||||
|
ij_smart_tabs = false
|
||||||
|
ij_visual_guides =
|
||||||
|
ij_wrap_on_typing = false
|
||||||
|
|
||||||
|
[*.css]
|
||||||
|
ij_css_align_closing_brace_with_properties = false
|
||||||
|
ij_css_blank_lines_around_nested_selector = 1
|
||||||
|
ij_css_blank_lines_between_blocks = 1
|
||||||
|
ij_css_block_comment_add_space = false
|
||||||
|
ij_css_brace_placement = end_of_line
|
||||||
|
ij_css_enforce_quotes_on_format = false
|
||||||
|
ij_css_hex_color_long_format = false
|
||||||
|
ij_css_hex_color_lower_case = false
|
||||||
|
ij_css_hex_color_short_format = false
|
||||||
|
ij_css_hex_color_upper_case = false
|
||||||
|
ij_css_keep_blank_lines_in_code = 2
|
||||||
|
ij_css_keep_indents_on_empty_lines = false
|
||||||
|
ij_css_keep_single_line_blocks = false
|
||||||
|
ij_css_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
|
||||||
|
ij_css_space_after_colon = true
|
||||||
|
ij_css_space_before_opening_brace = true
|
||||||
|
ij_css_use_double_quotes = true
|
||||||
|
ij_css_value_alignment = do_not_align
|
||||||
|
|
||||||
|
[*.prisma]
|
||||||
|
indent_size = 2
|
||||||
|
tab_width = 2
|
||||||
|
ij_prisma_line_comment_add_space = true
|
||||||
|
ij_prisma_line_comment_add_space_on_reformat = true
|
||||||
|
ij_prisma_line_comment_at_first_column = false
|
||||||
|
ij_prisma_run_prisma_fmt_on_reformat = true
|
||||||
|
|
||||||
|
[*.sass]
|
||||||
|
indent_size = 2
|
||||||
|
ij_sass_align_closing_brace_with_properties = false
|
||||||
|
ij_sass_blank_lines_around_nested_selector = 1
|
||||||
|
ij_sass_blank_lines_between_blocks = 1
|
||||||
|
ij_sass_brace_placement = 0
|
||||||
|
ij_sass_enforce_quotes_on_format = false
|
||||||
|
ij_sass_hex_color_long_format = false
|
||||||
|
ij_sass_hex_color_lower_case = false
|
||||||
|
ij_sass_hex_color_short_format = false
|
||||||
|
ij_sass_hex_color_upper_case = false
|
||||||
|
ij_sass_keep_blank_lines_in_code = 2
|
||||||
|
ij_sass_keep_indents_on_empty_lines = false
|
||||||
|
ij_sass_keep_single_line_blocks = false
|
||||||
|
ij_sass_line_comment_add_space = false
|
||||||
|
ij_sass_line_comment_at_first_column = false
|
||||||
|
ij_sass_properties_order = font, font-family, font-size, font-weight, font-style, font-variant, font-size-adjust, font-stretch, line-height, position, z-index, top, right, bottom, left, display, visibility, float, clear, overflow, overflow-x, overflow-y, clip, zoom, align-content, align-items, align-self, flex, flex-flow, flex-basis, flex-direction, flex-grow, flex-shrink, flex-wrap, justify-content, order, box-sizing, width, min-width, max-width, height, min-height, max-height, margin, margin-top, margin-right, margin-bottom, margin-left, padding, padding-top, padding-right, padding-bottom, padding-left, table-layout, empty-cells, caption-side, border-spacing, border-collapse, list-style, list-style-position, list-style-type, list-style-image, content, quotes, counter-reset, counter-increment, resize, cursor, user-select, nav-index, nav-up, nav-right, nav-down, nav-left, transition, transition-delay, transition-timing-function, transition-duration, transition-property, transform, transform-origin, animation, animation-name, animation-duration, animation-play-state, animation-timing-function, animation-delay, animation-iteration-count, animation-direction, text-align, text-align-last, vertical-align, white-space, text-decoration, text-emphasis, text-emphasis-color, text-emphasis-style, text-emphasis-position, text-indent, text-justify, letter-spacing, word-spacing, text-outline, text-transform, text-wrap, text-overflow, text-overflow-ellipsis, text-overflow-mode, word-wrap, word-break, tab-size, hyphens, pointer-events, opacity, color, border, border-width, border-style, border-color, border-top, border-top-width, border-top-style, border-top-color, border-right, border-right-width, border-right-style, border-right-color, border-bottom, border-bottom-width, border-bottom-style, border-bottom-color, border-left, border-left-width, border-left-style, border-left-color, border-radius, border-top-left-radius, border-top-right-radius, border-bottom-right-radius, border-bottom-left-radius, border-image, border-image-source, border-image-slice, border-image-width, border-image-outset, border-image-repeat, outline, outline-width, outline-style, outline-color, outline-offset, background, background-color, background-image, background-repeat, background-attachment, background-position, background-position-x, background-position-y, background-clip, background-origin, background-size, box-decoration-break, box-shadow, text-shadow
|
||||||
|
ij_sass_space_after_colon = true
|
||||||
|
ij_sass_space_before_opening_brace = true
|
||||||
|
ij_sass_use_double_quotes = true
|
||||||
|
ij_sass_value_alignment = 0
|
||||||
|
|
||||||
|
[.editorconfig]
|
||||||
|
ij_editorconfig_align_group_field_declarations = false
|
||||||
|
ij_editorconfig_space_after_colon = false
|
||||||
|
ij_editorconfig_space_after_comma = true
|
||||||
|
ij_editorconfig_space_before_colon = false
|
||||||
|
ij_editorconfig_space_before_comma = false
|
||||||
|
ij_editorconfig_spaces_around_assignment_operators = true
|
||||||
|
|
||||||
|
[{*.ant,*.fxml,*.jhm,*.jnlp,*.jrxml,*.pom,*.rng,*.tld,*.wadl,*.wsdl,*.xml,*.xsd,*.xsl,*.xslt,*.xul,phpunit.xml.dist}]
|
||||||
|
ij_xml_align_attributes = true
|
||||||
|
ij_xml_align_text = false
|
||||||
|
ij_xml_attribute_wrap = normal
|
||||||
|
ij_xml_block_comment_add_space = false
|
||||||
|
ij_xml_block_comment_at_first_column = true
|
||||||
|
ij_xml_keep_blank_lines = 2
|
||||||
|
ij_xml_keep_indents_on_empty_lines = false
|
||||||
|
ij_xml_keep_line_breaks = true
|
||||||
|
ij_xml_keep_line_breaks_in_text = true
|
||||||
|
ij_xml_keep_whitespaces = false
|
||||||
|
ij_xml_keep_whitespaces_around_cdata = preserve
|
||||||
|
ij_xml_keep_whitespaces_inside_cdata = false
|
||||||
|
ij_xml_line_comment_at_first_column = true
|
||||||
|
ij_xml_space_after_tag_name = false
|
||||||
|
ij_xml_space_around_equals_in_attribute = false
|
||||||
|
ij_xml_space_inside_empty_tag = false
|
||||||
|
ij_xml_text_wrap = normal
|
||||||
|
ij_xml_use_custom_settings = false
|
||||||
|
|
||||||
|
[{*.ats,*.cts,*.mts,*.ts}]
|
||||||
|
ij_continuation_indent_size = 4
|
||||||
|
ij_typescript_align_imports = false
|
||||||
|
ij_typescript_align_multiline_array_initializer_expression = false
|
||||||
|
ij_typescript_align_multiline_binary_operation = false
|
||||||
|
ij_typescript_align_multiline_chained_methods = false
|
||||||
|
ij_typescript_align_multiline_extends_list = false
|
||||||
|
ij_typescript_align_multiline_for = true
|
||||||
|
ij_typescript_align_multiline_parameters = true
|
||||||
|
ij_typescript_align_multiline_parameters_in_calls = false
|
||||||
|
ij_typescript_align_multiline_ternary_operation = false
|
||||||
|
ij_typescript_align_object_properties = 0
|
||||||
|
ij_typescript_align_union_types = false
|
||||||
|
ij_typescript_align_var_statements = 0
|
||||||
|
ij_typescript_array_initializer_new_line_after_left_brace = false
|
||||||
|
ij_typescript_array_initializer_right_brace_on_new_line = false
|
||||||
|
ij_typescript_array_initializer_wrap = off
|
||||||
|
ij_typescript_assignment_wrap = off
|
||||||
|
ij_typescript_binary_operation_sign_on_next_line = false
|
||||||
|
ij_typescript_binary_operation_wrap = off
|
||||||
|
ij_typescript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/**
|
||||||
|
ij_typescript_blank_lines_after_imports = 1
|
||||||
|
ij_typescript_blank_lines_around_class = 1
|
||||||
|
ij_typescript_blank_lines_around_field = 0
|
||||||
|
ij_typescript_blank_lines_around_field_in_interface = 0
|
||||||
|
ij_typescript_blank_lines_around_function = 1
|
||||||
|
ij_typescript_blank_lines_around_method = 1
|
||||||
|
ij_typescript_blank_lines_around_method_in_interface = 1
|
||||||
|
ij_typescript_block_brace_style = end_of_line
|
||||||
|
ij_typescript_block_comment_add_space = false
|
||||||
|
ij_typescript_block_comment_at_first_column = true
|
||||||
|
ij_typescript_call_parameters_new_line_after_left_paren = false
|
||||||
|
ij_typescript_call_parameters_right_paren_on_new_line = false
|
||||||
|
ij_typescript_call_parameters_wrap = off
|
||||||
|
ij_typescript_catch_on_new_line = false
|
||||||
|
ij_typescript_chained_call_dot_on_new_line = true
|
||||||
|
ij_typescript_class_brace_style = end_of_line
|
||||||
|
ij_typescript_comma_on_new_line = false
|
||||||
|
ij_typescript_do_while_brace_force = never
|
||||||
|
ij_typescript_else_on_new_line = false
|
||||||
|
ij_typescript_enforce_trailing_comma = keep
|
||||||
|
ij_typescript_enum_constants_wrap = on_every_item
|
||||||
|
ij_typescript_extends_keyword_wrap = off
|
||||||
|
ij_typescript_extends_list_wrap = off
|
||||||
|
ij_typescript_field_prefix = _
|
||||||
|
ij_typescript_file_name_style = relaxed
|
||||||
|
ij_typescript_finally_on_new_line = false
|
||||||
|
ij_typescript_for_brace_force = never
|
||||||
|
ij_typescript_for_statement_new_line_after_left_paren = false
|
||||||
|
ij_typescript_for_statement_right_paren_on_new_line = false
|
||||||
|
ij_typescript_for_statement_wrap = off
|
||||||
|
ij_typescript_force_quote_style = false
|
||||||
|
ij_typescript_force_semicolon_style = false
|
||||||
|
ij_typescript_function_expression_brace_style = end_of_line
|
||||||
|
ij_typescript_if_brace_force = never
|
||||||
|
ij_typescript_import_merge_members = global
|
||||||
|
ij_typescript_import_prefer_absolute_path = global
|
||||||
|
ij_typescript_import_sort_members = true
|
||||||
|
ij_typescript_import_sort_module_name = false
|
||||||
|
ij_typescript_import_use_node_resolution = true
|
||||||
|
ij_typescript_imports_wrap = on_every_item
|
||||||
|
ij_typescript_indent_case_from_switch = true
|
||||||
|
ij_typescript_indent_chained_calls = true
|
||||||
|
ij_typescript_indent_package_children = 0
|
||||||
|
ij_typescript_jsdoc_include_types = false
|
||||||
|
ij_typescript_jsx_attribute_value = braces
|
||||||
|
ij_typescript_keep_blank_lines_in_code = 2
|
||||||
|
ij_typescript_keep_first_column_comment = true
|
||||||
|
ij_typescript_keep_indents_on_empty_lines = false
|
||||||
|
ij_typescript_keep_line_breaks = true
|
||||||
|
ij_typescript_keep_simple_blocks_in_one_line = false
|
||||||
|
ij_typescript_keep_simple_methods_in_one_line = false
|
||||||
|
ij_typescript_line_comment_add_space = true
|
||||||
|
ij_typescript_line_comment_at_first_column = false
|
||||||
|
ij_typescript_method_brace_style = end_of_line
|
||||||
|
ij_typescript_method_call_chain_wrap = off
|
||||||
|
ij_typescript_method_parameters_new_line_after_left_paren = false
|
||||||
|
ij_typescript_method_parameters_right_paren_on_new_line = false
|
||||||
|
ij_typescript_method_parameters_wrap = off
|
||||||
|
ij_typescript_object_literal_wrap = on_every_item
|
||||||
|
ij_typescript_object_types_wrap = on_every_item
|
||||||
|
ij_typescript_parentheses_expression_new_line_after_left_paren = false
|
||||||
|
ij_typescript_parentheses_expression_right_paren_on_new_line = false
|
||||||
|
ij_typescript_place_assignment_sign_on_next_line = false
|
||||||
|
ij_typescript_prefer_as_type_cast = false
|
||||||
|
ij_typescript_prefer_explicit_types_function_expression_returns = false
|
||||||
|
ij_typescript_prefer_explicit_types_function_returns = false
|
||||||
|
ij_typescript_prefer_explicit_types_vars_fields = false
|
||||||
|
ij_typescript_prefer_parameters_wrap = false
|
||||||
|
ij_typescript_property_prefix =
|
||||||
|
ij_typescript_reformat_c_style_comments = false
|
||||||
|
ij_typescript_space_after_colon = true
|
||||||
|
ij_typescript_space_after_comma = true
|
||||||
|
ij_typescript_space_after_dots_in_rest_parameter = false
|
||||||
|
ij_typescript_space_after_generator_mult = true
|
||||||
|
ij_typescript_space_after_property_colon = true
|
||||||
|
ij_typescript_space_after_quest = true
|
||||||
|
ij_typescript_space_after_type_colon = true
|
||||||
|
ij_typescript_space_after_unary_not = false
|
||||||
|
ij_typescript_space_before_async_arrow_lparen = true
|
||||||
|
ij_typescript_space_before_catch_keyword = true
|
||||||
|
ij_typescript_space_before_catch_left_brace = true
|
||||||
|
ij_typescript_space_before_catch_parentheses = true
|
||||||
|
ij_typescript_space_before_class_lbrace = true
|
||||||
|
ij_typescript_space_before_class_left_brace = true
|
||||||
|
ij_typescript_space_before_colon = true
|
||||||
|
ij_typescript_space_before_comma = false
|
||||||
|
ij_typescript_space_before_do_left_brace = true
|
||||||
|
ij_typescript_space_before_else_keyword = true
|
||||||
|
ij_typescript_space_before_else_left_brace = true
|
||||||
|
ij_typescript_space_before_finally_keyword = true
|
||||||
|
ij_typescript_space_before_finally_left_brace = true
|
||||||
|
ij_typescript_space_before_for_left_brace = true
|
||||||
|
ij_typescript_space_before_for_parentheses = true
|
||||||
|
ij_typescript_space_before_for_semicolon = false
|
||||||
|
ij_typescript_space_before_function_left_parenth = true
|
||||||
|
ij_typescript_space_before_generator_mult = false
|
||||||
|
ij_typescript_space_before_if_left_brace = true
|
||||||
|
ij_typescript_space_before_if_parentheses = true
|
||||||
|
ij_typescript_space_before_method_call_parentheses = false
|
||||||
|
ij_typescript_space_before_method_left_brace = true
|
||||||
|
ij_typescript_space_before_method_parentheses = false
|
||||||
|
ij_typescript_space_before_property_colon = false
|
||||||
|
ij_typescript_space_before_quest = true
|
||||||
|
ij_typescript_space_before_switch_left_brace = true
|
||||||
|
ij_typescript_space_before_switch_parentheses = true
|
||||||
|
ij_typescript_space_before_try_left_brace = true
|
||||||
|
ij_typescript_space_before_type_colon = false
|
||||||
|
ij_typescript_space_before_unary_not = false
|
||||||
|
ij_typescript_space_before_while_keyword = true
|
||||||
|
ij_typescript_space_before_while_left_brace = true
|
||||||
|
ij_typescript_space_before_while_parentheses = true
|
||||||
|
ij_typescript_spaces_around_additive_operators = true
|
||||||
|
ij_typescript_spaces_around_arrow_function_operator = true
|
||||||
|
ij_typescript_spaces_around_assignment_operators = true
|
||||||
|
ij_typescript_spaces_around_bitwise_operators = true
|
||||||
|
ij_typescript_spaces_around_equality_operators = true
|
||||||
|
ij_typescript_spaces_around_logical_operators = true
|
||||||
|
ij_typescript_spaces_around_multiplicative_operators = true
|
||||||
|
ij_typescript_spaces_around_relational_operators = true
|
||||||
|
ij_typescript_spaces_around_shift_operators = true
|
||||||
|
ij_typescript_spaces_around_unary_operator = false
|
||||||
|
ij_typescript_spaces_within_array_initializer_brackets = false
|
||||||
|
ij_typescript_spaces_within_brackets = false
|
||||||
|
ij_typescript_spaces_within_catch_parentheses = false
|
||||||
|
ij_typescript_spaces_within_for_parentheses = false
|
||||||
|
ij_typescript_spaces_within_if_parentheses = false
|
||||||
|
ij_typescript_spaces_within_imports = true
|
||||||
|
ij_typescript_spaces_within_interpolation_expressions = false
|
||||||
|
ij_typescript_spaces_within_method_call_parentheses = false
|
||||||
|
ij_typescript_spaces_within_method_parentheses = false
|
||||||
|
ij_typescript_spaces_within_object_literal_braces = true
|
||||||
|
ij_typescript_spaces_within_object_type_braces = true
|
||||||
|
ij_typescript_spaces_within_parentheses = false
|
||||||
|
ij_typescript_spaces_within_switch_parentheses = false
|
||||||
|
ij_typescript_spaces_within_type_assertion = false
|
||||||
|
ij_typescript_spaces_within_union_types = true
|
||||||
|
ij_typescript_spaces_within_while_parentheses = false
|
||||||
|
ij_typescript_special_else_if_treatment = true
|
||||||
|
ij_typescript_ternary_operation_signs_on_next_line = false
|
||||||
|
ij_typescript_ternary_operation_wrap = off
|
||||||
|
ij_typescript_union_types_wrap = on_every_item
|
||||||
|
ij_typescript_use_chained_calls_group_indents = false
|
||||||
|
ij_typescript_use_double_quotes = true
|
||||||
|
ij_typescript_use_explicit_js_extension = auto
|
||||||
|
ij_typescript_use_path_mapping = always
|
||||||
|
ij_typescript_use_public_modifier = false
|
||||||
|
ij_typescript_use_semicolon_after_statement = true
|
||||||
|
ij_typescript_var_declaration_wrap = normal
|
||||||
|
ij_typescript_while_brace_force = never
|
||||||
|
ij_typescript_while_on_new_line = false
|
||||||
|
ij_typescript_wrap_comments = false
|
||||||
|
|
||||||
|
[{*.bash,*.sh,*.zsh}]
|
||||||
|
indent_size = 2
|
||||||
|
tab_width = 2
|
||||||
|
ij_shell_binary_ops_start_line = false
|
||||||
|
ij_shell_keep_column_alignment_padding = false
|
||||||
|
ij_shell_minify_program = false
|
||||||
|
ij_shell_redirect_followed_by_space = false
|
||||||
|
ij_shell_switch_cases_indented = false
|
||||||
|
ij_shell_use_unix_line_separator = true
|
||||||
|
|
||||||
|
[{*.cjs,*.js}]
|
||||||
|
ij_continuation_indent_size = 4
|
||||||
|
ij_javascript_align_imports = false
|
||||||
|
ij_javascript_align_multiline_array_initializer_expression = false
|
||||||
|
ij_javascript_align_multiline_binary_operation = false
|
||||||
|
ij_javascript_align_multiline_chained_methods = false
|
||||||
|
ij_javascript_align_multiline_extends_list = false
|
||||||
|
ij_javascript_align_multiline_for = true
|
||||||
|
ij_javascript_align_multiline_parameters = true
|
||||||
|
ij_javascript_align_multiline_parameters_in_calls = false
|
||||||
|
ij_javascript_align_multiline_ternary_operation = false
|
||||||
|
ij_javascript_align_object_properties = 0
|
||||||
|
ij_javascript_align_union_types = false
|
||||||
|
ij_javascript_align_var_statements = 0
|
||||||
|
ij_javascript_array_initializer_new_line_after_left_brace = false
|
||||||
|
ij_javascript_array_initializer_right_brace_on_new_line = false
|
||||||
|
ij_javascript_array_initializer_wrap = off
|
||||||
|
ij_javascript_assignment_wrap = off
|
||||||
|
ij_javascript_binary_operation_sign_on_next_line = false
|
||||||
|
ij_javascript_binary_operation_wrap = off
|
||||||
|
ij_javascript_blacklist_imports = rxjs/Rx, node_modules/**, **/node_modules/**, @angular/material, @angular/material/typings/**
|
||||||
|
ij_javascript_blank_lines_after_imports = 1
|
||||||
|
ij_javascript_blank_lines_around_class = 1
|
||||||
|
ij_javascript_blank_lines_around_field = 0
|
||||||
|
ij_javascript_blank_lines_around_function = 1
|
||||||
|
ij_javascript_blank_lines_around_method = 1
|
||||||
|
ij_javascript_block_brace_style = end_of_line
|
||||||
|
ij_javascript_block_comment_add_space = false
|
||||||
|
ij_javascript_block_comment_at_first_column = true
|
||||||
|
ij_javascript_call_parameters_new_line_after_left_paren = false
|
||||||
|
ij_javascript_call_parameters_right_paren_on_new_line = false
|
||||||
|
ij_javascript_call_parameters_wrap = off
|
||||||
|
ij_javascript_catch_on_new_line = false
|
||||||
|
ij_javascript_chained_call_dot_on_new_line = true
|
||||||
|
ij_javascript_class_brace_style = end_of_line
|
||||||
|
ij_javascript_comma_on_new_line = false
|
||||||
|
ij_javascript_do_while_brace_force = always
|
||||||
|
ij_javascript_else_on_new_line = false
|
||||||
|
ij_javascript_enforce_trailing_comma = keep
|
||||||
|
ij_javascript_extends_keyword_wrap = off
|
||||||
|
ij_javascript_extends_list_wrap = off
|
||||||
|
ij_javascript_field_prefix = _
|
||||||
|
ij_javascript_file_name_style = relaxed
|
||||||
|
ij_javascript_finally_on_new_line = false
|
||||||
|
ij_javascript_for_brace_force = always
|
||||||
|
ij_javascript_for_statement_new_line_after_left_paren = false
|
||||||
|
ij_javascript_for_statement_right_paren_on_new_line = false
|
||||||
|
ij_javascript_for_statement_wrap = off
|
||||||
|
ij_javascript_force_quote_style = false
|
||||||
|
ij_javascript_force_semicolon_style = false
|
||||||
|
ij_javascript_function_expression_brace_style = end_of_line
|
||||||
|
ij_javascript_if_brace_force = never
|
||||||
|
ij_javascript_import_merge_members = global
|
||||||
|
ij_javascript_import_prefer_absolute_path = global
|
||||||
|
ij_javascript_import_sort_members = true
|
||||||
|
ij_javascript_import_sort_module_name = false
|
||||||
|
ij_javascript_import_use_node_resolution = true
|
||||||
|
ij_javascript_imports_wrap = on_every_item
|
||||||
|
ij_javascript_indent_case_from_switch = true
|
||||||
|
ij_javascript_indent_chained_calls = true
|
||||||
|
ij_javascript_indent_package_children = 0
|
||||||
|
ij_javascript_jsx_attribute_value = braces
|
||||||
|
ij_javascript_keep_blank_lines_in_code = 2
|
||||||
|
ij_javascript_keep_first_column_comment = true
|
||||||
|
ij_javascript_keep_indents_on_empty_lines = false
|
||||||
|
ij_javascript_keep_line_breaks = true
|
||||||
|
ij_javascript_keep_simple_blocks_in_one_line = false
|
||||||
|
ij_javascript_keep_simple_methods_in_one_line = false
|
||||||
|
ij_javascript_line_comment_add_space = true
|
||||||
|
ij_javascript_line_comment_at_first_column = false
|
||||||
|
ij_javascript_method_brace_style = end_of_line
|
||||||
|
ij_javascript_method_call_chain_wrap = off
|
||||||
|
ij_javascript_method_parameters_new_line_after_left_paren = false
|
||||||
|
ij_javascript_method_parameters_right_paren_on_new_line = false
|
||||||
|
ij_javascript_method_parameters_wrap = off
|
||||||
|
ij_javascript_object_literal_wrap = on_every_item
|
||||||
|
ij_javascript_object_types_wrap = on_every_item
|
||||||
|
ij_javascript_parentheses_expression_new_line_after_left_paren = false
|
||||||
|
ij_javascript_parentheses_expression_right_paren_on_new_line = false
|
||||||
|
ij_javascript_place_assignment_sign_on_next_line = false
|
||||||
|
ij_javascript_prefer_as_type_cast = false
|
||||||
|
ij_javascript_prefer_explicit_types_function_expression_returns = false
|
||||||
|
ij_javascript_prefer_explicit_types_function_returns = false
|
||||||
|
ij_javascript_prefer_explicit_types_vars_fields = false
|
||||||
|
ij_javascript_prefer_parameters_wrap = false
|
||||||
|
ij_javascript_property_prefix =
|
||||||
|
ij_javascript_reformat_c_style_comments = false
|
||||||
|
ij_javascript_space_after_colon = true
|
||||||
|
ij_javascript_space_after_comma = true
|
||||||
|
ij_javascript_space_after_dots_in_rest_parameter = false
|
||||||
|
ij_javascript_space_after_generator_mult = true
|
||||||
|
ij_javascript_space_after_property_colon = true
|
||||||
|
ij_javascript_space_after_quest = true
|
||||||
|
ij_javascript_space_after_type_colon = true
|
||||||
|
ij_javascript_space_after_unary_not = false
|
||||||
|
ij_javascript_space_before_async_arrow_lparen = true
|
||||||
|
ij_javascript_space_before_catch_keyword = true
|
||||||
|
ij_javascript_space_before_catch_left_brace = true
|
||||||
|
ij_javascript_space_before_catch_parentheses = true
|
||||||
|
ij_javascript_space_before_class_lbrace = true
|
||||||
|
ij_javascript_space_before_class_left_brace = true
|
||||||
|
ij_javascript_space_before_colon = true
|
||||||
|
ij_javascript_space_before_comma = false
|
||||||
|
ij_javascript_space_before_do_left_brace = true
|
||||||
|
ij_javascript_space_before_else_keyword = true
|
||||||
|
ij_javascript_space_before_else_left_brace = true
|
||||||
|
ij_javascript_space_before_finally_keyword = true
|
||||||
|
ij_javascript_space_before_finally_left_brace = true
|
||||||
|
ij_javascript_space_before_for_left_brace = true
|
||||||
|
ij_javascript_space_before_for_parentheses = true
|
||||||
|
ij_javascript_space_before_for_semicolon = false
|
||||||
|
ij_javascript_space_before_function_left_parenth = true
|
||||||
|
ij_javascript_space_before_generator_mult = false
|
||||||
|
ij_javascript_space_before_if_left_brace = true
|
||||||
|
ij_javascript_space_before_if_parentheses = true
|
||||||
|
ij_javascript_space_before_method_call_parentheses = false
|
||||||
|
ij_javascript_space_before_method_left_brace = true
|
||||||
|
ij_javascript_space_before_method_parentheses = false
|
||||||
|
ij_javascript_space_before_property_colon = false
|
||||||
|
ij_javascript_space_before_quest = true
|
||||||
|
ij_javascript_space_before_switch_left_brace = true
|
||||||
|
ij_javascript_space_before_switch_parentheses = true
|
||||||
|
ij_javascript_space_before_try_left_brace = true
|
||||||
|
ij_javascript_space_before_type_colon = false
|
||||||
|
ij_javascript_space_before_unary_not = false
|
||||||
|
ij_javascript_space_before_while_keyword = true
|
||||||
|
ij_javascript_space_before_while_left_brace = true
|
||||||
|
ij_javascript_space_before_while_parentheses = true
|
||||||
|
ij_javascript_spaces_around_additive_operators = true
|
||||||
|
ij_javascript_spaces_around_arrow_function_operator = true
|
||||||
|
ij_javascript_spaces_around_assignment_operators = true
|
||||||
|
ij_javascript_spaces_around_bitwise_operators = true
|
||||||
|
ij_javascript_spaces_around_equality_operators = true
|
||||||
|
ij_javascript_spaces_around_logical_operators = true
|
||||||
|
ij_javascript_spaces_around_multiplicative_operators = true
|
||||||
|
ij_javascript_spaces_around_relational_operators = true
|
||||||
|
ij_javascript_spaces_around_shift_operators = true
|
||||||
|
ij_javascript_spaces_around_unary_operator = false
|
||||||
|
ij_javascript_spaces_within_array_initializer_brackets = false
|
||||||
|
ij_javascript_spaces_within_brackets = false
|
||||||
|
ij_javascript_spaces_within_catch_parentheses = false
|
||||||
|
ij_javascript_spaces_within_for_parentheses = false
|
||||||
|
ij_javascript_spaces_within_if_parentheses = false
|
||||||
|
ij_javascript_spaces_within_imports = true
|
||||||
|
ij_javascript_spaces_within_interpolation_expressions = false
|
||||||
|
ij_javascript_spaces_within_method_call_parentheses = false
|
||||||
|
ij_javascript_spaces_within_method_parentheses = false
|
||||||
|
ij_javascript_spaces_within_object_literal_braces = true
|
||||||
|
ij_javascript_spaces_within_object_type_braces = true
|
||||||
|
ij_javascript_spaces_within_parentheses = false
|
||||||
|
ij_javascript_spaces_within_switch_parentheses = false
|
||||||
|
ij_javascript_spaces_within_type_assertion = false
|
||||||
|
ij_javascript_spaces_within_union_types = true
|
||||||
|
ij_javascript_spaces_within_while_parentheses = false
|
||||||
|
ij_javascript_special_else_if_treatment = true
|
||||||
|
ij_javascript_ternary_operation_signs_on_next_line = false
|
||||||
|
ij_javascript_ternary_operation_wrap = off
|
||||||
|
ij_javascript_union_types_wrap = on_every_item
|
||||||
|
ij_javascript_use_chained_calls_group_indents = false
|
||||||
|
ij_javascript_use_double_quotes = true
|
||||||
|
ij_javascript_use_explicit_js_extension = auto
|
||||||
|
ij_javascript_use_path_mapping = always
|
||||||
|
ij_javascript_use_public_modifier = false
|
||||||
|
ij_javascript_use_semicolon_after_statement = true
|
||||||
|
ij_javascript_var_declaration_wrap = normal
|
||||||
|
ij_javascript_while_brace_force = always
|
||||||
|
ij_javascript_while_on_new_line = false
|
||||||
|
ij_javascript_wrap_comments = false
|
||||||
|
|
||||||
|
[{*.go,*.go2}]
|
||||||
|
indent_style = tab
|
||||||
|
ij_continuation_indent_size = 4
|
||||||
|
ij_go_GROUP_CURRENT_PROJECT_IMPORTS = false
|
||||||
|
ij_go_add_leading_space_to_comments = false
|
||||||
|
ij_go_add_parentheses_for_single_import = false
|
||||||
|
ij_go_call_parameters_new_line_after_left_paren = true
|
||||||
|
ij_go_call_parameters_right_paren_on_new_line = true
|
||||||
|
ij_go_call_parameters_wrap = off
|
||||||
|
ij_go_fill_paragraph_width = 80
|
||||||
|
ij_go_group_stdlib_imports = true
|
||||||
|
ij_go_import_sorting = gofmt
|
||||||
|
ij_go_keep_indents_on_empty_lines = false
|
||||||
|
ij_go_local_group_mode = project
|
||||||
|
ij_go_local_package_prefixes =
|
||||||
|
ij_go_move_all_imports_in_one_declaration = true
|
||||||
|
ij_go_move_all_stdlib_imports_in_one_group = true
|
||||||
|
ij_go_remove_redundant_import_aliases = false
|
||||||
|
ij_go_run_go_fmt_on_reformat = true
|
||||||
|
ij_go_use_back_quotes_for_imports = false
|
||||||
|
ij_go_wrap_comp_lit = off
|
||||||
|
ij_go_wrap_comp_lit_newline_after_lbrace = true
|
||||||
|
ij_go_wrap_comp_lit_newline_before_rbrace = true
|
||||||
|
ij_go_wrap_func_params = off
|
||||||
|
ij_go_wrap_func_params_newline_after_lparen = true
|
||||||
|
ij_go_wrap_func_params_newline_before_rparen = true
|
||||||
|
ij_go_wrap_func_result = off
|
||||||
|
ij_go_wrap_func_result_newline_after_lparen = true
|
||||||
|
ij_go_wrap_func_result_newline_before_rparen = true
|
||||||
|
|
||||||
|
[{*.har,*.jsb2,*.jsb3,*.json,.babelrc,.eslintrc,.prettierrc,.stylelintrc,bowerrc,composer.lock,jest.config}]
|
||||||
|
indent_size = 2
|
||||||
|
ij_json_array_wrapping = split_into_lines
|
||||||
|
ij_json_keep_blank_lines_in_code = 0
|
||||||
|
ij_json_keep_indents_on_empty_lines = false
|
||||||
|
ij_json_keep_line_breaks = true
|
||||||
|
ij_json_keep_trailing_comma = false
|
||||||
|
ij_json_object_wrapping = split_into_lines
|
||||||
|
ij_json_property_alignment = do_not_align
|
||||||
|
ij_json_space_after_colon = true
|
||||||
|
ij_json_space_after_comma = true
|
||||||
|
ij_json_space_before_colon = false
|
||||||
|
ij_json_space_before_comma = false
|
||||||
|
ij_json_spaces_within_braces = false
|
||||||
|
ij_json_spaces_within_brackets = false
|
||||||
|
ij_json_wrap_long_lines = false
|
||||||
|
|
||||||
|
[{*.markdown,*.md}]
|
||||||
|
ij_markdown_force_one_space_after_blockquote_symbol = true
|
||||||
|
ij_markdown_force_one_space_after_header_symbol = true
|
||||||
|
ij_markdown_force_one_space_after_list_bullet = true
|
||||||
|
ij_markdown_force_one_space_between_words = true
|
||||||
|
ij_markdown_format_tables = true
|
||||||
|
ij_markdown_insert_quote_arrows_on_wrap = true
|
||||||
|
ij_markdown_keep_indents_on_empty_lines = false
|
||||||
|
ij_markdown_keep_line_breaks_inside_text_blocks = true
|
||||||
|
ij_markdown_max_lines_around_block_elements = 1
|
||||||
|
ij_markdown_max_lines_around_header = 1
|
||||||
|
ij_markdown_max_lines_between_paragraphs = 1
|
||||||
|
ij_markdown_min_lines_around_block_elements = 1
|
||||||
|
ij_markdown_min_lines_around_header = 1
|
||||||
|
ij_markdown_min_lines_between_paragraphs = 1
|
||||||
|
ij_markdown_wrap_text_if_long = true
|
||||||
|
ij_markdown_wrap_text_inside_blockquotes = true
|
||||||
|
|
||||||
|
[{*.properties,spring.handlers,spring.schemas}]
|
||||||
|
ij_properties_align_group_field_declarations = false
|
||||||
|
ij_properties_keep_blank_lines = false
|
||||||
|
ij_properties_key_value_delimiter = equals
|
||||||
|
ij_properties_spaces_around_key_value_delimiter = false
|
||||||
|
|
||||||
|
[{*.toml,Cargo.lock,Cargo.toml.orig,Gopkg.lock,Pipfile,poetry.lock}]
|
||||||
|
ij_toml_keep_indents_on_empty_lines = false
|
||||||
|
|
||||||
|
[{*.yaml,*.yml}]
|
||||||
|
indent_size = 2
|
||||||
|
ij_yaml_align_values_properties = do_not_align
|
||||||
|
ij_yaml_autoinsert_sequence_marker = true
|
||||||
|
ij_yaml_block_mapping_on_new_line = false
|
||||||
|
ij_yaml_indent_sequence_value = true
|
||||||
|
ij_yaml_keep_indents_on_empty_lines = false
|
||||||
|
ij_yaml_keep_line_breaks = true
|
||||||
|
ij_yaml_sequence_on_new_line = false
|
||||||
|
ij_yaml_space_before_colon = false
|
||||||
|
ij_yaml_spaces_within_braces = true
|
||||||
|
ij_yaml_spaces_within_brackets = true
|
|
@ -1 +1,3 @@
|
||||||
ko_fi: aldy505
|
github: aldy505
|
||||||
|
ko_fi: aldy505
|
||||||
|
liberapay: aldy505
|
|
@ -2,13 +2,13 @@ name: CI
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: ["master"]
|
branches: [ "master" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
api-build:
|
api-build:
|
||||||
name: API
|
name: API
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: golang:1.19-bullseye
|
container: golang:1.21.0-bookworm
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
services:
|
services:
|
||||||
bucket:
|
bucket:
|
||||||
|
@ -29,7 +29,7 @@ jobs:
|
||||||
volumes:
|
volumes:
|
||||||
- minio-data:/data
|
- minio-data:/data
|
||||||
redis:
|
redis:
|
||||||
image: redis:6-bullseye
|
image: redis:7.0.12-bookworm
|
||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- 6379:6379
|
||||||
defaults:
|
defaults:
|
||||||
|
@ -38,7 +38,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Installling dependencies
|
- name: Installling dependencies
|
||||||
run: go mod download
|
run: go mod download
|
||||||
|
@ -57,15 +57,16 @@ jobs:
|
||||||
REDIS_URL: redis://@redis:6379
|
REDIS_URL: redis://@redis:6379
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
||||||
- name: Create Sentry release
|
- name: Create Sentry release
|
||||||
uses: getsentry/action-release@v1
|
uses: getsentry/action-release@v1
|
||||||
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }}
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }}
|
||||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||||
|
@ -75,14 +76,14 @@ jobs:
|
||||||
set_commits: skip
|
set_commits: skip
|
||||||
version: ${{ github.sha }}
|
version: ${{ github.sha }}
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v2
|
- uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
flags: api
|
flags: api
|
||||||
|
|
||||||
client-build:
|
client-build:
|
||||||
name: Client
|
name: Client
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: node:18-bullseye
|
container: node:18.17.1-bookworm
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
@ -90,7 +91,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Installling dependencies
|
- name: Installling dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
@ -106,15 +107,16 @@ jobs:
|
||||||
VITE_API_ENDPOINT: https://jokesbapak2.reinaldyrafli.com/api/v1
|
VITE_API_ENDPOINT: https://jokesbapak2.reinaldyrafli.com/api/v1
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
||||||
- name: Create Sentry release
|
- name: Create Sentry release
|
||||||
uses: getsentry/action-release@v1
|
uses: getsentry/action-release@v1
|
||||||
|
continue-on-error: true
|
||||||
env:
|
env:
|
||||||
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }}
|
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_TOKEN }}
|
||||||
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
SENTRY_ORG: ${{ secrets.SENTRY_ORG }}
|
||||||
|
|
|
@ -2,13 +2,13 @@ name: PR
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: ["*"]
|
branches: [ "*" ]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
client-build:
|
client-build:
|
||||||
name: Client
|
name: Client
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: node:18-bullseye
|
container: node:18.17.1-bookworm
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
|
@ -16,9 +16,9 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Installling dependencies
|
- name: Install dependencies
|
||||||
run: npm install
|
run: npm install
|
||||||
|
|
||||||
- name: Lint
|
- name: Lint
|
||||||
|
@ -35,17 +35,17 @@ jobs:
|
||||||
VITE_API_ENDPOINT: https://jokesbapak2.reinaldyrafli.com/api/v1
|
VITE_API_ENDPOINT: https://jokesbapak2.reinaldyrafli.com/api/v1
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
languages: javascript
|
languages: javascript
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
||||||
api-build:
|
api-build:
|
||||||
name: API
|
name: API
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
container: golang:1.19-bullseye
|
container: golang:1.21.0-bookworm
|
||||||
timeout-minutes: 15
|
timeout-minutes: 15
|
||||||
services:
|
services:
|
||||||
bucket:
|
bucket:
|
||||||
|
@ -66,7 +66,7 @@ jobs:
|
||||||
volumes:
|
volumes:
|
||||||
- minio-data:/data
|
- minio-data:/data
|
||||||
redis:
|
redis:
|
||||||
image: redis:6-bullseye
|
image: redis:7.0.12-bookworm
|
||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- 6379:6379
|
||||||
defaults:
|
defaults:
|
||||||
|
@ -75,7 +75,7 @@ jobs:
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Installling dependencies
|
- name: Installling dependencies
|
||||||
run: go mod download
|
run: go mod download
|
||||||
|
@ -94,13 +94,13 @@ jobs:
|
||||||
REDIS_URL: redis://@redis:6379
|
REDIS_URL: redis://@redis:6379
|
||||||
|
|
||||||
- name: Initialize CodeQL
|
- name: Initialize CodeQL
|
||||||
uses: github/codeql-action/init@v1
|
uses: github/codeql-action/init@v2
|
||||||
with:
|
with:
|
||||||
languages: go
|
languages: go
|
||||||
|
|
||||||
- name: Perform CodeQL Analysis
|
- name: Perform CodeQL Analysis
|
||||||
uses: github/codeql-action/analyze@v1
|
uses: github/codeql-action/analyze@v2
|
||||||
|
|
||||||
- uses: codecov/codecov-action@v2
|
- uses: codecov/codecov-action@v4
|
||||||
with:
|
with:
|
||||||
flags: api
|
flags: api
|
||||||
|
|
|
@ -0,0 +1,8 @@
|
||||||
|
# Default ignored files
|
||||||
|
/shelf/
|
||||||
|
/workspace.xml
|
||||||
|
# Editor-based HTTP Client requests
|
||||||
|
/httpRequests/
|
||||||
|
# Datasource local storage ignored files
|
||||||
|
/dataSources/
|
||||||
|
/dataSources.local.xml
|
|
@ -0,0 +1,7 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="DiscordProjectSettings">
|
||||||
|
<option name="show" value="ASK" />
|
||||||
|
<option name="description" value="" />
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<component name="InspectionProjectProfileManager">
|
||||||
|
<profile version="1.0">
|
||||||
|
<option name="myName" value="Project Default" />
|
||||||
|
<inspection_tool class="Eslint" enabled="true" level="WARNING" enabled_by_default="true" />
|
||||||
|
</profile>
|
||||||
|
</component>
|
|
@ -0,0 +1,9 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<module type="WEB_MODULE" version="4">
|
||||||
|
<component name="Go" enabled="true" />
|
||||||
|
<component name="NewModuleRootManager">
|
||||||
|
<content url="file://$MODULE_DIR$" />
|
||||||
|
<orderEntry type="inheritedJdk" />
|
||||||
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
|
</component>
|
||||||
|
</module>
|
|
@ -0,0 +1,8 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ProjectModuleManager">
|
||||||
|
<modules>
|
||||||
|
<module fileurl="file://$PROJECT_DIR$/.idea/jokes-bapak2.iml" filepath="$PROJECT_DIR$/.idea/jokes-bapak2.iml" />
|
||||||
|
</modules>
|
||||||
|
</component>
|
||||||
|
</project>
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="VcsDirectoryMappings">
|
||||||
|
<mapping directory="" vcs="Git" />
|
||||||
|
</component>
|
||||||
|
</project>
|
160
CONTRIBUTING.md
160
CONTRIBUTING.md
|
@ -1,75 +1,87 @@
|
||||||
# Contributing Guide
|
# Contributing Guide
|
||||||
|
|
||||||
First of all. Thank you for considering to contribute on Jokes Bapak2 API project. I hope this project will get better and we will become more bapak2 than ever.
|
First of all. Thank you for considering to contribute on Jokes Bapak2 API project. I hope this project will get better
|
||||||
|
and we will become more bapak2 than ever.
|
||||||
This project is a monorepo, meaning the backend, frontend, and Github CI are all in one place (one repository). Before you do anything, if you're going to do some breaking change or you'll write (or remove) large numbers of LOC (line of codes), please open an issue first and let us know about it. So that our work won't bother you and you'll have a breeze on developing this.
|
|
||||||
|
This project is a monorepo, meaning the backend, frontend, and Github CI are all in one place (one repository). Before
|
||||||
## Project Prerequisites && Setup
|
you do anything, if you're going to do some breaking change or you'll write (or remove) large numbers of LOC (line of
|
||||||
|
codes), please open an issue first and let us know about it. So that our work won't bother you and you'll have a breeze
|
||||||
### Front End (`./client`)
|
on developing this.
|
||||||
|
|
||||||
You'll have to install:
|
## Project Prerequisites && Setup
|
||||||
* Node.js LTS (preferably with [fnm](https://github.com/Schniz/fnm) or [nvm](https://github.com/nvm-sh/nvm))
|
|
||||||
* Yarn v1
|
### Front End (`./client`)
|
||||||
|
|
||||||
See the [README](./client/README.md) on client for detailed project setup.
|
You'll have to install:
|
||||||
|
|
||||||
### Back End (`./api`)
|
* Node.js LTS (preferably with [fnm](https://github.com/Schniz/fnm) or [nvm](https://github.com/nvm-sh/nvm))
|
||||||
|
* Yarn v1
|
||||||
You'll have to install:
|
|
||||||
* Go v1.16.x
|
See the [README](./client/README.md) on client for detailed project setup.
|
||||||
* (Optional) [Fiber CLI](https://github.com/gofiber/cli) for ease of development
|
|
||||||
|
### Back End (`./api`)
|
||||||
See the [README](./api/README.md) on client for detailed project setup.
|
|
||||||
|
You'll have to install:
|
||||||
### With Docker Compose
|
|
||||||
|
* Go v1.16.x
|
||||||
If you're just developing the front end and too lazy installing Go and such (or the other way around), you can use `docker-compose` file specified on the main page.
|
* (Optional) [Fiber CLI](https://github.com/gofiber/cli) for ease of development
|
||||||
|
|
||||||
You'll have to install:
|
See the [README](./api/README.md) on client for detailed project setup.
|
||||||
* Docker (preferably with Docker Desktop if you're on Windows or Mac)
|
|
||||||
* Docker Compose
|
### With Docker Compose
|
||||||
|
|
||||||
```bash
|
If you're just developing the front end and too lazy installing Go and such (or the other way around), you can
|
||||||
# Create a docker container but don't start it yet.
|
use `docker-compose` file specified on the main page.
|
||||||
$ docker-compose up --no-start
|
|
||||||
|
You'll have to install:
|
||||||
# Or if you want to create the docker container and start it right away
|
|
||||||
$ docker-compose up
|
* Docker (preferably with Docker Desktop if you're on Windows or Mac)
|
||||||
|
* Docker Compose
|
||||||
# If you want to have it running in the background
|
|
||||||
$ docker-compose up --detach
|
```bash
|
||||||
|
# Create a docker container but don't start it yet.
|
||||||
# Start existing container
|
$ docker-compose up --no-start
|
||||||
$ docker-compose start
|
|
||||||
|
# Or if you want to create the docker container and start it right away
|
||||||
# Stop running container
|
$ docker-compose up
|
||||||
$ docker-compose stop
|
|
||||||
|
# If you want to have it running in the background
|
||||||
# Destroy current container
|
$ docker-compose up --detach
|
||||||
$ docker-compose down
|
|
||||||
```
|
# Start existing container
|
||||||
|
$ docker-compose start
|
||||||
## Before submitting PR
|
|
||||||
|
# Stop running container
|
||||||
### Front End (`./client`)
|
$ docker-compose stop
|
||||||
|
|
||||||
Please run these:
|
# Destroy current container
|
||||||
* `yarn lint`
|
$ docker-compose down
|
||||||
* `yarn format`
|
```
|
||||||
* `yarn build`
|
|
||||||
|
## Before submitting PR
|
||||||
If those command didn't pass, please fix the problem first. Please recheck your changes, make sure NOT to leave any secret token/keys behind.
|
|
||||||
|
### Front End (`./client`)
|
||||||
### Back End (`./api`)
|
|
||||||
|
Please run these:
|
||||||
Please run these:
|
|
||||||
* `go fmt`
|
* `yarn lint`
|
||||||
* `go build main.go`
|
* `yarn format`
|
||||||
* `go test -v -race -coverprofile=coverage.out -covermode=atomic ./...`
|
* `yarn build`
|
||||||
|
|
||||||
If those command didn't pass, please fix the problem first. Please recheck your changes, make sure NOT to leave any secret token/keys behind.
|
If those command didn't pass, please fix the problem first. Please recheck your changes, make sure NOT to leave any
|
||||||
|
secret token/keys behind.
|
||||||
## One more thing..
|
|
||||||
|
### Back End (`./api`)
|
||||||
|
|
||||||
|
Please run these:
|
||||||
|
|
||||||
|
* `go fmt`
|
||||||
|
* `go build main.go`
|
||||||
|
* `go test -v -race -coverprofile=coverage.out -covermode=atomic ./...`
|
||||||
|
|
||||||
|
If those command didn't pass, please fix the problem first. Please recheck your changes, make sure NOT to leave any
|
||||||
|
secret token/keys behind.
|
||||||
|
|
||||||
|
## One more thing..
|
||||||
|
|
||||||
Oh my God, thank you so much!!! Working on an open source project is interesting right?? 😆
|
Oh my God, thank you so much!!! Working on an open source project is interesting right?? 😆
|
162
README.md
162
README.md
|
@ -1,79 +1,85 @@
|
||||||
<h1 align="center">
|
<h1 align="center">
|
||||||
<br>
|
<br>
|
||||||
<img src=".github/images/header_github.png" alt="Jokes Bapak2 Heading" width="1000">
|
<img src=".github/images/header_github.png" alt="Jokes Bapak2 Heading" width="1000">
|
||||||
<br>
|
<br>
|
||||||
<br>
|
<br>
|
||||||
Jokes Bapak2 Image API
|
Jokes Bapak2 Image API
|
||||||
<br>
|
<br>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
👋 Hey there! Always a work in progress, if you'd like to contribute this while this repo is still growing, that would be so great!
|
👋 Hey there! Always a work in progress, if you'd like to contribute this while this repo is still growing, that would be
|
||||||
|
so great!
|
||||||
ou can access the front facing web on [jokesbapak2.reinaldyrafli.com](http://jokesbapak2.reinaldyrafli.com/).
|
|
||||||
|
ou can access the front facing web on [jokesbapak2.reinaldyrafli.com](http://jokesbapak2.reinaldyrafli.com/).
|
||||||
## Brief explanation of what is this
|
|
||||||
|
## Brief explanation of what is this
|
||||||
Jokes Bapak2 is an image API that you can use for free! I've been seeing lots and lots of Indonesian dad jokes on Twitter, Facebook and Instagram on early 2020. In a month, I made a Discord bot that provides the jokes. But I thought, why not make it as an API?
|
|
||||||
|
Jokes Bapak2 is an image API that you can use for free! I've been seeing lots and lots of Indonesian dad jokes on
|
||||||
This is some kind of [icanhazdadjokes](https://icanhazdadjoke.com/) but it's Indonesian and it's not text, it's images. Dad jokes in Indonesia is somewhat a bit different than in US/UK because, I guess, here, it's a lot dumber.
|
Twitter, Facebook and Instagram on early 2020. In a month, I made a Discord bot that provides the jokes. But I thought,
|
||||||
|
why not make it as an API?
|
||||||
## Project Directories
|
|
||||||
|
This is some kind of [icanhazdadjokes](https://icanhazdadjoke.com/) but it's Indonesian and it's not text, it's images.
|
||||||
* `api` - REST API service. Created with Go with [Fiber](https://gofiber.io/) framework.
|
Dad jokes in Indonesia is somewhat a bit different than in US/UK because, I guess, here, it's a lot dumber.
|
||||||
* `client` - Front facing website (front end). Created with [Svelte Kit](https://kit.svelte.dev/).
|
|
||||||
|
## Project Directories
|
||||||
You can consume this API via a website (linked in the front facing web) with a few endpoints:
|
|
||||||
|
* `api` - REST API service. Created with Go with [Fiber](https://gofiber.io/) framework.
|
||||||
* `/` - Random jokes bapak2
|
* `client` - Front facing website (front end). Created with [Svelte Kit](https://kit.svelte.dev/).
|
||||||
* `/id/{number}` - Jokes bapak2 based on ID
|
|
||||||
* `/today` - Jokes bapak2 of the day
|
You can consume this API via a website (linked in the front facing web) with a few endpoints:
|
||||||
* `/total` - Total available jokes bapak2
|
|
||||||
|
* `/` - Random jokes bapak2
|
||||||
Currently I'm (still) searching for an alternative for AWS S3 that I can use for free.
|
* `/id/{number}` - Jokes bapak2 based on ID
|
||||||
|
* `/today` - Jokes bapak2 of the day
|
||||||
## Tech stacks
|
* `/total` - Total available jokes bapak2
|
||||||
|
|
||||||
* Go (for `api` / back end)
|
Currently I'm (still) searching for an alternative for AWS S3 that I can use for free.
|
||||||
* Node.js (for `client` / front end)
|
|
||||||
* Postgres
|
## Tech stacks
|
||||||
* Redis
|
|
||||||
|
* Go (for `api` / back end)
|
||||||
That's it.
|
* Node.js (for `client` / front end)
|
||||||
|
* Postgres
|
||||||
## Development
|
* Redis
|
||||||
|
|
||||||
Two ways of doing this:
|
That's it.
|
||||||
1. Install all the tech stack on your local machine
|
|
||||||
2. Using docker-compose
|
## Development
|
||||||
|
|
||||||
See [CONTRIBUTING](./CONTRIBUTING.md) or README files on each project directory for further instruction on how to run the development environment.
|
Two ways of doing this:
|
||||||
|
|
||||||
## Thanks to
|
1. Install all the tech stack on your local machine
|
||||||
|
2. Using docker-compose
|
||||||
* [Teknologi Umum](https://t.me/teknologi_umum)
|
|
||||||
* [Ronny Gunawan](https://github.com/ronnygunawan) for the caching concept & ideas
|
See [CONTRIBUTING](./CONTRIBUTING.md) or README files on each project directory for further instruction on how to run
|
||||||
* [artileda](https://github.com/artileda) for the jokes submission
|
the development environment.
|
||||||
* [elianiva](https://github.com/elianiva) for solving my SvelteKit problems
|
|
||||||
* [kokizzu](https://github.com/kokizzu) for the dependency injection concept & ideas
|
## Thanks to
|
||||||
|
|
||||||
## License
|
* [Teknologi Umum](https://t.me/teknologi_umum)
|
||||||
|
* [Ronny Gunawan](https://github.com/ronnygunawan) for the caching concept & ideas
|
||||||
Jokes Bapak2 API is licensed under [GNU GENERAL PUBLIC LICENSE v3 license](./LICENSE)
|
* [artileda](https://github.com/artileda) for the jokes submission
|
||||||
|
* [elianiva](https://github.com/elianiva) for solving my SvelteKit problems
|
||||||
```
|
* [kokizzu](https://github.com/kokizzu) for the dependency injection concept & ideas
|
||||||
Jokes Bapak2 API is a free-to-use image API of Indonesian dad jokes.
|
|
||||||
Copyright (C) 2021-present Jokes Bapak2 Contributors
|
## License
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
Jokes Bapak2 API is licensed under [GNU GENERAL PUBLIC LICENSE v3 license](./LICENSE)
|
||||||
it under the terms of the GNU General Public License as published by
|
|
||||||
the Free Software Foundation, either version 3 of the License, or
|
```
|
||||||
(at your option) any later version.
|
Jokes Bapak2 API is a free-to-use image API of Indonesian dad jokes.
|
||||||
|
Copyright (C) 2021-present Reinaldy Rafli <aldy505@proton.me>
|
||||||
This program is distributed in the hope that it will be useful,
|
|
||||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
This program is free software: you can redistribute it and/or modify
|
||||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
it under the terms of the GNU General Public License as published by
|
||||||
GNU General Public License for more details.
|
the Free Software Foundation, either version 3 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
You should have received a copy of the GNU General Public License
|
|
||||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||||
```
|
```
|
|
@ -1,4 +1,4 @@
|
||||||
FROM golang:1.19.0-bullseye AS builder
|
FROM golang:1.21.0-bookworm AS builder
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
@ -6,13 +6,15 @@ COPY . .
|
||||||
|
|
||||||
RUN go build -o main .
|
RUN go build -o main .
|
||||||
|
|
||||||
FROM debian:bullseye AS runtime
|
FROM debian:bookworm-slim AS runtime
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
RUN apt-get update && apt-get upgrade --no-install-recommends -y \
|
RUN apt-get update && \
|
||||||
&& apt-get install -y curl ca-certificates \
|
apt-get upgrade --no-install-recommends -y && \
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
apt-get install -y curl ca-certificates && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
COPY --from=builder /app/main .
|
COPY --from=builder /app/main .
|
||||||
|
|
||||||
|
|
155
api/README.md
155
api/README.md
|
@ -1,78 +1,79 @@
|
||||||
# Jokes Bapak2 API
|
# Jokes Bapak2 API
|
||||||
|
|
||||||
Still work in progress
|
Still work in progress
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
# Install modules
|
# Install modules
|
||||||
$ go mod download
|
$ go mod download
|
||||||
# or
|
# or
|
||||||
$ go mod vendor
|
$ go mod vendor
|
||||||
|
|
||||||
# run the local server
|
# run the local server
|
||||||
$ go run main.go
|
$ go run main.go
|
||||||
|
|
||||||
# build everything
|
# build everything
|
||||||
$ go build main.go
|
$ go build main.go
|
||||||
```
|
```
|
||||||
|
|
||||||
There is a placeholder data ready for you to query it manually in `/platform/database/placeholder.sql`. Have a good time developing!
|
There is a placeholder data ready for you to query it manually in `/platform/database/placeholder.sql`. Have a good time
|
||||||
|
developing!
|
||||||
## Used packages
|
|
||||||
|
## Used packages
|
||||||
| Name | Version | Type |
|
|
||||||
| --- | --- | --- |
|
| Name | Version | Type |
|
||||||
| [gofiber/fiber](https://github.com/gofiber/fiber) | `v2.21.0` | Framework |
|
|------------------------------------------------------------------|--------------------------------------|-----------|
|
||||||
| [jackc/pgx](https://github.com/jackc/pgx) | `v4.13.0` | Database |
|
| [gofiber/fiber](https://github.com/gofiber/fiber) | `v2.21.0` | Framework |
|
||||||
| [go-redis/redis](https://github.com/go-redis/redis) | `v8.11.4` | Cache |
|
| [jackc/pgx](https://github.com/jackc/pgx) | `v4.13.0` | Database |
|
||||||
| [allegro/bigcache](https://github.com/allegro/bigcache) | `v3.0.1` | Cache |
|
| [go-redis/redis](https://github.com/go-redis/redis) | `v8.11.4` | Cache |
|
||||||
| [joho/godotenv](https://github.com/joho/godotenv) | `v1.4.0` | Config |
|
| [allegro/bigcache](https://github.com/allegro/bigcache) | `v3.0.1` | Cache |
|
||||||
| [getsentry/sentry-go](https://github.com/getsentry/sentry-go) | `v0.11.0` | Logging |
|
| [joho/godotenv](https://github.com/joho/godotenv) | `v1.4.0` | Config |
|
||||||
| [aldy505/phc-crypto](https://github.com/aldy505/phc-crypto) | `v1.1.0` | Utils |
|
| [getsentry/sentry-go](https://github.com/getsentry/sentry-go) | `v0.11.0` | Logging |
|
||||||
| [Masterminds/squirrel](https://github.com/Masterminds/squirrel ) | `v1.5.1` | Utils |
|
| [aldy505/phc-crypto](https://github.com/aldy505/phc-crypto) | `v1.1.0` | Utils |
|
||||||
| [aldy505/bob](https://github.com/aldy505/bob) | `v0.0.4` | Utils |
|
| [Masterminds/squirrel](https://github.com/Masterminds/squirrel ) | `v1.5.1` | Utils |
|
||||||
| [gojek/heimdall](https://github.com/gojek/heimdall) | `v7.0.2` | Utils |
|
| [aldy505/bob](https://github.com/aldy505/bob) | `v0.0.4` | Utils |
|
||||||
| [georgysavva/scany](https://github.com/georgysavva/scany) | `v0.2.9` | Utils |
|
| [gojek/heimdall](https://github.com/gojek/heimdall) | `v7.0.2` | Utils |
|
||||||
| [pquerna/ffjson](https://github.com/pquerna/ffjson) | `v0.0.0-20190930134022-aa0246cd15f7` | Utils |
|
| [georgysavva/scany](https://github.com/georgysavva/scany) | `v0.2.9` | Utils |
|
||||||
|
| [pquerna/ffjson](https://github.com/pquerna/ffjson) | `v0.0.0-20190930134022-aa0246cd15f7` | Utils |
|
||||||
## Directory structure
|
|
||||||
|
## Directory structure
|
||||||
```
|
|
||||||
.
|
```
|
||||||
├── core - Pure business logic
|
.
|
||||||
│ ├── administrator
|
├── core - Pure business logic
|
||||||
│ ├── joke
|
│ ├── administrator
|
||||||
│ ├── schema
|
│ ├── joke
|
||||||
│ ├── submit
|
│ ├── schema
|
||||||
│ └── validator
|
│ ├── submit
|
||||||
├── Dockerfile - Docker image for API
|
│ └── validator
|
||||||
├── documentation.json - Swagger documentation
|
├── Dockerfile - Docker image for API
|
||||||
├── documentation.yaml - Swagger documentation
|
├── documentation.json - Swagger documentation
|
||||||
├── favicon.png
|
├── documentation.yaml - Swagger documentation
|
||||||
├── go.mod - Module declaration
|
├── favicon.png
|
||||||
├── go.sum - Checksum for modules
|
├── go.mod - Module declaration
|
||||||
├── handler - Route handlers
|
├── go.sum - Checksum for modules
|
||||||
│ ├── health
|
├── handler - Route handlers
|
||||||
│ ├── joke
|
│ ├── health
|
||||||
│ └── submit
|
│ ├── joke
|
||||||
├── main.go - Application entry point
|
│ └── submit
|
||||||
├── middleware - Route middlewares
|
├── main.go - Application entry point
|
||||||
├── platform - Third party packages
|
├── middleware - Route middlewares
|
||||||
│ └── database
|
├── platform - Third party packages
|
||||||
├── README.md - You are here
|
│ └── database
|
||||||
├── routes - Route definitions
|
├── README.md - You are here
|
||||||
└── utils - Utility functions
|
├── routes - Route definitions
|
||||||
```
|
└── utils - Utility functions
|
||||||
|
```
|
||||||
## `.env` configuration
|
|
||||||
|
## `.env` configuration
|
||||||
```ini
|
|
||||||
ENV=development
|
```ini
|
||||||
PORT=5000
|
ENV=development
|
||||||
|
PORT=5000
|
||||||
DATABASE_URL=postgres://postgres:password@localhost:5432/jokesbapak2
|
|
||||||
REDIS_URL=redis://@localhost:6379
|
DATABASE_URL=postgres://postgres:password@localhost:5432/jokesbapak2
|
||||||
|
REDIS_URL=redis://@localhost:6379
|
||||||
SENTRY_DSN=
|
|
||||||
|
SENTRY_DSN=
|
||||||
```
|
```
|
|
@ -2,9 +2,10 @@ package joke_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"jokes-bapak2-api/core/joke"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"jokes-bapak2-api/core/joke"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetRandomJoke(t *testing.T) {
|
func TestGetRandomJoke(t *testing.T) {
|
||||||
|
|
|
@ -2,9 +2,10 @@ package joke_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"jokes-bapak2-api/core/joke"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"jokes-bapak2-api/core/joke"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestListJokeFromBucket(t *testing.T) {
|
func TestListJokeFromBucket(t *testing.T) {
|
||||||
|
|
|
@ -2,9 +2,10 @@ package joke_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"jokes-bapak2-api/core/joke"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"jokes-bapak2-api/core/joke"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetTodaysJoke(t *testing.T) {
|
func TestGetTodaysJoke(t *testing.T) {
|
||||||
|
|
|
@ -2,9 +2,10 @@ package joke_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"context"
|
"context"
|
||||||
"jokes-bapak2-api/core/joke"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"jokes-bapak2-api/core/joke"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestGetTotalJoke(t *testing.T) {
|
func TestGetTotalJoke(t *testing.T) {
|
||||||
|
|
|
@ -1,321 +1,321 @@
|
||||||
openapi: 3.0.0
|
openapi: 3.0.0
|
||||||
info:
|
info:
|
||||||
title: Jokesbapak2 Image API
|
title: Jokesbapak2 Image API
|
||||||
description: >
|
description: >
|
||||||
Jokes Bapak2 is an image API that you can use for free! I've been seeing lots and lots of Indonesian dad jokes on Twitter,
|
Jokes Bapak2 is an image API that you can use for free! I've been seeing lots and lots of Indonesian dad jokes on Twitter,
|
||||||
Facebook and Instagram on early 2020. In a month, I made a Discord bot that provides the jokes.
|
Facebook and Instagram on early 2020. In a month, I made a Discord bot that provides the jokes.
|
||||||
But I thought, why not make it as an API?
|
But I thought, why not make it as an API?
|
||||||
version: 0.0.1
|
version: 0.0.1
|
||||||
contact:
|
contact:
|
||||||
name: Reinaldy Rafli
|
name: Reinaldy Rafli
|
||||||
url: https://github.com/aldy505
|
url: https://github.com/aldy505
|
||||||
email: aldy505@tutanota.com
|
email: aldy505@tutanota.com
|
||||||
license:
|
license:
|
||||||
name: GNU General Public License v3.0
|
name: GNU General Public License v3.0
|
||||||
url: https://github.com/aldy505/jokes-bapak2/blob/master/LICENSE
|
url: https://github.com/aldy505/jokes-bapak2/blob/master/LICENSE
|
||||||
servers:
|
servers:
|
||||||
- url: "https://jokesbapak2.reinaldyrafli.com/api/v1"
|
- url: "https://jokesbapak2.reinaldyrafli.com/api/v1"
|
||||||
description: Production
|
description: Production
|
||||||
- url: "https://jokesbapak2.reinaldyrafli.com/api"
|
- url: "https://jokesbapak2.reinaldyrafli.com/api"
|
||||||
description: Production
|
description: Production
|
||||||
- url: "http://localhost:5000"
|
- url: "http://localhost:5000"
|
||||||
description: Development
|
description: Development
|
||||||
paths:
|
paths:
|
||||||
/:
|
/:
|
||||||
get:
|
get:
|
||||||
tags:
|
tags:
|
||||||
- Jokes
|
- Jokes
|
||||||
summary: Get random Jokes Bapak2 image
|
summary: Get random Jokes Bapak2 image
|
||||||
description: Returns a different image (PNG, JPG, or GIF) for every call.
|
description: Returns a different image (PNG, JPG, or GIF) for every call.
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Image data
|
description: Image data
|
||||||
content:
|
content:
|
||||||
"image/gif": {}
|
"image/gif": { }
|
||||||
"image/png": {}
|
"image/png": { }
|
||||||
"image/jpeg": {}
|
"image/jpeg": { }
|
||||||
put:
|
put:
|
||||||
summary: Add a new joke into database
|
summary: Add a new joke into database
|
||||||
description: asd
|
description: asd
|
||||||
tags:
|
tags:
|
||||||
- Jokes
|
- Jokes
|
||||||
requestBody:
|
requestBody:
|
||||||
description: asds
|
description: asds
|
||||||
required: true
|
required: true
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/request.auth"
|
- $ref: "#/components/schemas/request.auth"
|
||||||
- $ref: "#/components/schemas/request.joke"
|
- $ref: "#/components/schemas/request.joke"
|
||||||
responses:
|
responses:
|
||||||
201:
|
201:
|
||||||
description: Image has been added
|
description: Image has been added
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/request.joke"
|
$ref: "#/components/schemas/request.joke"
|
||||||
example:
|
example:
|
||||||
link: https://link.to/image.jpg
|
link: https://link.to/image.jpg
|
||||||
400:
|
400:
|
||||||
description: Bad request
|
description: Bad request
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.error"
|
$ref: "#/components/schemas/response.error"
|
||||||
example:
|
example:
|
||||||
error: URL provided is not a valid image
|
error: URL provided is not a valid image
|
||||||
403:
|
403:
|
||||||
description: Must be authenticated to submit a joke
|
description: Must be authenticated to submit a joke
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.error"
|
$ref: "#/components/schemas/response.error"
|
||||||
/id/{id}:
|
/id/{id}:
|
||||||
parameters:
|
parameters:
|
||||||
- in: path
|
- in: path
|
||||||
name: id
|
name: id
|
||||||
schema:
|
schema:
|
||||||
type: number
|
type: number
|
||||||
required: true
|
required: true
|
||||||
description: A number that represents image's ID
|
description: A number that represents image's ID
|
||||||
get:
|
get:
|
||||||
summary: Get random Jokes Bapak2 image by ID
|
summary: Get random Jokes Bapak2 image by ID
|
||||||
description: Returns consistent image for every call.
|
description: Returns consistent image for every call.
|
||||||
tags:
|
tags:
|
||||||
- Jokes
|
- Jokes
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Image data
|
description: Image data
|
||||||
content:
|
content:
|
||||||
"image/jpeg": {}
|
"image/jpeg": { }
|
||||||
"image/png": {}
|
"image/png": { }
|
||||||
"image/gif": {}
|
"image/gif": { }
|
||||||
404:
|
404:
|
||||||
description: Provided image ID was not found
|
description: Provided image ID was not found
|
||||||
content:
|
content:
|
||||||
text/plain:
|
text/plain:
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
example: Requested ID was not found.
|
example: Requested ID was not found.
|
||||||
patch:
|
patch:
|
||||||
summary: Update a Joke with certain image ID
|
summary: Update a Joke with certain image ID
|
||||||
description: Returns consistent image for every call.
|
description: Returns consistent image for every call.
|
||||||
tags:
|
tags:
|
||||||
- Jokes
|
- Jokes
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Sucessfully updated an image item
|
description: Sucessfully updated an image item
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/response.confirmation"
|
- $ref: "#/components/schemas/response.confirmation"
|
||||||
- $ref: "#/components/schemas/request.joke"
|
- $ref: "#/components/schemas/request.joke"
|
||||||
400:
|
400:
|
||||||
description: Link provided is not a valid image
|
description: Link provided is not a valid image
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.error"
|
$ref: "#/components/schemas/response.error"
|
||||||
403:
|
403:
|
||||||
description: Must be authenticated to submit a joke
|
description: Must be authenticated to submit a joke
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.error"
|
$ref: "#/components/schemas/response.error"
|
||||||
406:
|
406:
|
||||||
description: If the Joke ID does not exists
|
description: If the Joke ID does not exists
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.error"
|
$ref: "#/components/schemas/response.error"
|
||||||
delete:
|
delete:
|
||||||
summary: Delete a Joke with certain image ID
|
summary: Delete a Joke with certain image ID
|
||||||
description: hi
|
description: hi
|
||||||
tags:
|
tags:
|
||||||
- Jokes
|
- Jokes
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Sucessfully deleted an image item
|
description: Sucessfully deleted an image item
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.confirmation"
|
$ref: "#/components/schemas/response.confirmation"
|
||||||
403:
|
403:
|
||||||
description: Must be authenticated to submit a joke
|
description: Must be authenticated to submit a joke
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.error"
|
$ref: "#/components/schemas/response.error"
|
||||||
406:
|
406:
|
||||||
description: If the Joke ID does not exists
|
description: If the Joke ID does not exists
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.error"
|
$ref: "#/components/schemas/response.error"
|
||||||
/today:
|
/today:
|
||||||
get:
|
get:
|
||||||
summary: Get the joke of the day
|
summary: Get the joke of the day
|
||||||
description: A joke a day makes more of a dad out of you.
|
description: A joke a day makes more of a dad out of you.
|
||||||
tags:
|
tags:
|
||||||
- Jokes
|
- Jokes
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Image data
|
description: Image data
|
||||||
content:
|
content:
|
||||||
"image/jpeg": {}
|
"image/jpeg": { }
|
||||||
"image/png": {}
|
"image/png": { }
|
||||||
"image/gif": {}
|
"image/gif": { }
|
||||||
/total:
|
/total:
|
||||||
get:
|
get:
|
||||||
summary: Get total amount of jokes in database
|
summary: Get total amount of jokes in database
|
||||||
tags:
|
tags:
|
||||||
- Jokes
|
- Jokes
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Total jokes
|
description: Total jokes
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.confirmation"
|
$ref: "#/components/schemas/response.confirmation"
|
||||||
example:
|
example:
|
||||||
message: "154"
|
message: "154"
|
||||||
/submit:
|
/submit:
|
||||||
get:
|
get:
|
||||||
summary: Get submitted Jokes
|
summary: Get submitted Jokes
|
||||||
tags:
|
tags:
|
||||||
- Submission
|
- Submission
|
||||||
parameters:
|
parameters:
|
||||||
- name: author
|
- name: author
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
description: Author to be queried
|
description: Author to be queried
|
||||||
schema:
|
schema:
|
||||||
type: string
|
type: string
|
||||||
- name: approved
|
- name: approved
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
description: Whether query just approved jokes or not
|
description: Whether query just approved jokes or not
|
||||||
schema:
|
schema:
|
||||||
type: boolean
|
type: boolean
|
||||||
- name: limit
|
- name: limit
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: number
|
type: number
|
||||||
- name: page
|
- name: page
|
||||||
in: query
|
in: query
|
||||||
required: false
|
required: false
|
||||||
schema:
|
schema:
|
||||||
type: number
|
type: number
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: asd
|
description: asd
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
count:
|
count:
|
||||||
type: number
|
type: number
|
||||||
jokes:
|
jokes:
|
||||||
type: array
|
type: array
|
||||||
items:
|
items:
|
||||||
$ref: "#/components/schemas/response.submission"
|
$ref: "#/components/schemas/response.submission"
|
||||||
post:
|
post:
|
||||||
summary: Submit a joke
|
summary: Submit a joke
|
||||||
description: >
|
description: >
|
||||||
Must be in multipart/form-data format.
|
Must be in multipart/form-data format.
|
||||||
Author must be in the format of "Name <email>".
|
Author must be in the format of "Name <email>".
|
||||||
tags:
|
tags:
|
||||||
- Submission
|
- Submission
|
||||||
requestBody:
|
requestBody:
|
||||||
content:
|
content:
|
||||||
multipart/form-data:
|
multipart/form-data:
|
||||||
schema:
|
schema:
|
||||||
properties:
|
properties:
|
||||||
link:
|
link:
|
||||||
description: Image link
|
description: Image link
|
||||||
type: string
|
type: string
|
||||||
image:
|
image:
|
||||||
description: Image data
|
description: Image data
|
||||||
type: string
|
type: string
|
||||||
author:
|
author:
|
||||||
description: Person who submitted this
|
description: Person who submitted this
|
||||||
type: string
|
type: string
|
||||||
required:
|
required:
|
||||||
- author
|
- author
|
||||||
- image
|
- image
|
||||||
- link
|
- link
|
||||||
responses:
|
responses:
|
||||||
201:
|
201:
|
||||||
description: Joke successfully submitted
|
description: Joke successfully submitted
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
allOf:
|
allOf:
|
||||||
- $ref: "#/components/schemas/response.confirmation"
|
- $ref: "#/components/schemas/response.confirmation"
|
||||||
- type: object
|
- type: object
|
||||||
properties:
|
properties:
|
||||||
data:
|
data:
|
||||||
$ref: "#/components/schemas/response.submission"
|
$ref: "#/components/schemas/response.submission"
|
||||||
400:
|
400:
|
||||||
description: Invalid data was sent
|
description: Invalid data was sent
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.error"
|
$ref: "#/components/schemas/response.error"
|
||||||
/health:
|
/health:
|
||||||
get:
|
get:
|
||||||
summary: Health check
|
summary: Health check
|
||||||
description: Ping the databases to make sure everything's alright
|
description: Ping the databases to make sure everything's alright
|
||||||
tags:
|
tags:
|
||||||
- Health
|
- Health
|
||||||
responses:
|
responses:
|
||||||
200:
|
200:
|
||||||
description: Everything is okay
|
description: Everything is okay
|
||||||
403:
|
403:
|
||||||
description: Something is not okay
|
description: Something is not okay
|
||||||
content:
|
content:
|
||||||
application/json:
|
application/json:
|
||||||
schema:
|
schema:
|
||||||
$ref: "#/components/schemas/response.error"
|
$ref: "#/components/schemas/response.error"
|
||||||
|
|
||||||
components:
|
components:
|
||||||
schemas:
|
schemas:
|
||||||
request.auth:
|
request.auth:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
key:
|
key:
|
||||||
type: string
|
type: string
|
||||||
token:
|
token:
|
||||||
type: string
|
type: string
|
||||||
request.joke:
|
request.joke:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
link:
|
link:
|
||||||
type: string
|
type: string
|
||||||
response.confirmation:
|
response.confirmation:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
message:
|
message:
|
||||||
type: string
|
type: string
|
||||||
response.error:
|
response.error:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
error:
|
error:
|
||||||
type: string
|
type: string
|
||||||
response.submission:
|
response.submission:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
id:
|
id:
|
||||||
type: number
|
type: number
|
||||||
link:
|
link:
|
||||||
type: string
|
type: string
|
||||||
created_at:
|
created_at:
|
||||||
type: string
|
type: string
|
||||||
author:
|
author:
|
||||||
type: string
|
type: string
|
||||||
status:
|
status:
|
||||||
type: number
|
type: number
|
||||||
|
|
50
api/go.mod
50
api/go.mod
|
@ -1,52 +1,38 @@
|
||||||
module jokes-bapak2-api
|
module jokes-bapak2-api
|
||||||
|
|
||||||
go 1.19
|
go 1.20
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/aldy505/bob v0.0.4
|
github.com/allegro/bigcache/v3 v3.1.0
|
||||||
github.com/allegro/bigcache/v3 v3.0.1
|
github.com/getsentry/sentry-go v0.23.0
|
||||||
github.com/getsentry/sentry-go v0.11.0
|
github.com/go-redis/redis/v8 v8.11.5
|
||||||
github.com/go-redis/redis/v8 v8.11.4
|
|
||||||
github.com/jackc/pgx/v4 v4.13.0
|
|
||||||
github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7
|
github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f // indirect
|
golang.org/x/sys v0.10.0 // indirect
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b // indirect
|
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/go-chi/chi/v5 v5.0.7
|
github.com/go-chi/chi/v5 v5.0.10
|
||||||
github.com/minio/minio-go/v7 v7.0.35
|
github.com/minio/minio-go/v7 v7.0.61
|
||||||
github.com/rs/cors v1.8.2
|
github.com/rs/cors v1.9.0
|
||||||
)
|
)
|
||||||
|
|
||||||
require (
|
require (
|
||||||
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
github.com/cespare/xxhash/v2 v2.1.2 // indirect
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f // indirect
|
||||||
github.com/dustin/go-humanize v1.0.0 // indirect
|
github.com/dustin/go-humanize v1.0.1 // indirect
|
||||||
github.com/fsnotify/fsnotify v1.5.1 // indirect
|
github.com/fsnotify/fsnotify v1.5.1 // indirect
|
||||||
github.com/google/uuid v1.3.0 // indirect
|
github.com/google/uuid v1.3.0 // indirect
|
||||||
github.com/jackc/chunkreader/v2 v2.0.1 // indirect
|
|
||||||
github.com/jackc/pgconn v1.10.0 // indirect
|
|
||||||
github.com/jackc/pgio v1.0.0 // indirect
|
|
||||||
github.com/jackc/pgpassfile v1.0.0 // indirect
|
|
||||||
github.com/jackc/pgproto3/v2 v2.1.1 // indirect
|
|
||||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b // indirect
|
|
||||||
github.com/jackc/pgtype v1.8.1 // indirect
|
|
||||||
github.com/jackc/puddle v1.1.4 // indirect
|
|
||||||
github.com/json-iterator/go v1.1.12 // indirect
|
github.com/json-iterator/go v1.1.12 // indirect
|
||||||
github.com/klauspost/compress v1.15.9 // indirect
|
github.com/klauspost/compress v1.16.7 // indirect
|
||||||
github.com/klauspost/cpuid/v2 v2.1.0 // indirect
|
github.com/klauspost/cpuid/v2 v2.2.5 // indirect
|
||||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 // indirect
|
|
||||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 // indirect
|
|
||||||
github.com/minio/md5-simd v1.1.2 // indirect
|
github.com/minio/md5-simd v1.1.2 // indirect
|
||||||
github.com/minio/sha256-simd v1.0.0 // indirect
|
github.com/minio/sha256-simd v1.0.1 // indirect
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||||
github.com/modern-go/reflect2 v1.0.2 // indirect
|
github.com/modern-go/reflect2 v1.0.2 // indirect
|
||||||
github.com/pkg/errors v0.9.1 // indirect
|
github.com/rs/xid v1.5.0 // indirect
|
||||||
github.com/rs/xid v1.4.0 // indirect
|
github.com/sirupsen/logrus v1.9.3 // indirect
|
||||||
github.com/sirupsen/logrus v1.9.0 // indirect
|
golang.org/x/crypto v0.11.0 // indirect
|
||||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa // indirect
|
golang.org/x/net v0.12.0 // indirect
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b // indirect
|
golang.org/x/text v0.11.0 // indirect
|
||||||
golang.org/x/text v0.3.7 // indirect
|
gopkg.in/ini.v1 v1.67.0 // indirect
|
||||||
gopkg.in/ini.v1 v1.66.6 // indirect
|
|
||||||
)
|
)
|
||||||
|
|
435
api/go.sum
435
api/go.sum
|
@ -1,432 +1,79 @@
|
||||||
github.com/AndreasBriese/bbloom v0.0.0-20190306092124-e2d15f34fcf9/go.mod h1:bOvUY6CB00SOBii9/FifXqc0awNKxLFCL/+pkDPuyl8=
|
github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk=
|
||||||
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
|
github.com/allegro/bigcache/v3 v3.1.0/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I=
|
||||||
github.com/CloudyKit/fastprinter v0.0.0-20200109182630-33d98a066a53/go.mod h1:+3IMCy2vIlbG1XG/0ggNQv0SvxCAIpPM5b1nCz56Xno=
|
|
||||||
github.com/CloudyKit/jet/v3 v3.0.0/go.mod h1:HKQPgSJmdK8hdoAbKUUWajkHyHo4RaU5rMdUywE7VMo=
|
|
||||||
github.com/Joker/hpp v1.0.0/go.mod h1:8x5n+M1Hp5hC0g8okX3sR3vFQwynaX/UgSOM9MeBKzY=
|
|
||||||
github.com/Masterminds/semver/v3 v3.1.1/go.mod h1:VPu/7SZ7ePZ3QOrcuXROw5FAcLl4a0cBrbBpGY/8hQs=
|
|
||||||
github.com/Shopify/goreferrer v0.0.0-20181106222321-ec9c9a553398/go.mod h1:a1uqRtAwp2Xwc6WNPJEufxJ7fx3npB4UV/JOLmbu5I0=
|
|
||||||
github.com/ajg/form v1.5.1/go.mod h1:uL1WgH+h2mgNtvBq0339dVnzXdBETtL2LeUXaIv25UY=
|
|
||||||
github.com/aldy505/bob v0.0.4 h1:36lj6JUHxGp7yt672aKcC8gk6rXpIRO/aqclQ9aXDa8=
|
|
||||||
github.com/aldy505/bob v0.0.4/go.mod h1:uckrZqhg9zmbLA4MpKueIeQfrdriNqbmMalvf0+qPG4=
|
|
||||||
github.com/allegro/bigcache/v3 v3.0.1 h1:Q4Xl3chywXuJNOw7NV+MeySd3zGQDj4KCpkCg0te8mc=
|
|
||||||
github.com/allegro/bigcache/v3 v3.0.1/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I=
|
|
||||||
github.com/armon/consul-api v0.0.0-20180202201655-eb2c6b5be1b6/go.mod h1:grANhF5doyWs3UAsr3K4I6qtAmlQcZDesFNEHPZAzj8=
|
|
||||||
github.com/aymerick/raymond v2.0.3-0.20180322193309-b565731e1464+incompatible/go.mod h1:osfaiScAUVup+UC9Nfq76eWqDhXlp+4UYaA8uhTBO6g=
|
|
||||||
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
github.com/cespare/xxhash/v2 v2.1.2 h1:YRXhKfTDauu4ajMg1TPgFO5jnlC2HCbmLXMcTG5cbYE=
|
||||||
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
github.com/cespare/xxhash/v2 v2.1.2/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs=
|
||||||
github.com/cockroachdb/apd v1.1.0 h1:3LFP3629v+1aKXU5Q37mxmRxX/pIu1nijXydLShEq5I=
|
|
||||||
github.com/cockroachdb/apd v1.1.0/go.mod h1:8Sl8LxpKi29FqWXR16WEFZRNSz3SoPzUzeMeY4+DwBQ=
|
|
||||||
github.com/codegangsta/inject v0.0.0-20150114235600-33e0aa1cb7c0/go.mod h1:4Zcjuz89kmFXt9morQgcfYZAYZ5n8WHjt81YYWIwtTM=
|
|
||||||
github.com/coreos/etcd v3.3.10+incompatible/go.mod h1:uF7uidLiAD3TWHmW31ZFd/JWoc32PjwdhPthX9715RE=
|
|
||||||
github.com/coreos/go-etcd v2.0.0+incompatible/go.mod h1:Jez6KQU2B/sWsbdaef3ED8NzMklzPG4d5KIOhIy30Tk=
|
|
||||||
github.com/coreos/go-semver v0.2.0/go.mod h1:nnelYz7RCh+5ahJtPPxZlU+153eP4D4r3EedlOD2RNk=
|
|
||||||
github.com/coreos/go-systemd v0.0.0-20190321100706-95778dfbb74e/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
|
||||||
github.com/coreos/go-systemd v0.0.0-20190719114852-fd7a80b32e1f/go.mod h1:F5haX7vjVVG0kc13fIWeqUViNPyEJxv/OmvnBo0Yme4=
|
|
||||||
github.com/cpuguy83/go-md2man v1.0.10/go.mod h1:SmD6nW6nTyfqj6ABTjUi3V3JVMnlJmwcJI5acqYI6dE=
|
|
||||||
github.com/creack/pty v1.1.7/go.mod h1:lj5s0c3V2DBrqTV7llrYr5NG6My20zk30Fl46Y7DoTY=
|
|
||||||
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.0/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
|
||||||
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
|
||||||
github.com/dgraph-io/badger v1.6.0/go.mod h1:zwt7syl517jmP8s94KqSxTlM6IMsdhYy6psNgSztDR4=
|
|
||||||
github.com/dgrijalva/jwt-go v3.2.0+incompatible/go.mod h1:E3ru+11k8xSBh+hMPgOLZmtrrCbhqsmaPHjLKYnJCaQ=
|
|
||||||
github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw=
|
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f h1:lO4WD4F/rVNCu3HqELle0jiPLLBs70cWOduZpkS1E78=
|
||||||
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
github.com/dgryski/go-rendezvous v0.0.0-20200823014737-9f7001d12a5f/go.mod h1:cuUVRXasLTGF7a8hSLbxyZXjz+1KgoB3wDUb6vlszIc=
|
||||||
github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo=
|
github.com/dustin/go-humanize v1.0.1 h1:GzkhY7T5VNhEkwH0PVJgjz+fX1rhBrR7pRT3mDkpeCY=
|
||||||
github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk=
|
github.com/dustin/go-humanize v1.0.1/go.mod h1:Mu1zIs6XwVuF/gI1OepvI0qD18qycQx+mFykh5fBlto=
|
||||||
github.com/eknkc/amber v0.0.0-20171010120322-cdade1c07385/go.mod h1:0vRUJqYpeSZifjYj7uP3BG/gKcuzL9xWVV/Y+cK33KM=
|
|
||||||
github.com/etcd-io/bbolt v1.3.3/go.mod h1:ZF2nL25h33cCyBtcyWeZ2/I3HQOfTP+0PIEvHjkjCrw=
|
|
||||||
github.com/fasthttp-contrib/websocket v0.0.0-20160511215533-1f3b11f56072/go.mod h1:duJ4Jxv5lDcvg4QuQr0oowTf7dz4/CR8NtyCooz9HL8=
|
|
||||||
github.com/fatih/structs v1.1.0/go.mod h1:9NiDSp5zOcgEDl+j00MP/WkGVPOlPRLejGD8Ga6PJ7M=
|
|
||||||
github.com/fsnotify/fsnotify v1.4.7/go.mod h1:jwhsz4b93w/PPRr/qN1Yymfu8t87LnFCMoQvtojpjFo=
|
|
||||||
github.com/fsnotify/fsnotify v1.4.9/go.mod h1:znqG4EE+3YCdAaPaxE2ZRY/06pZUdp0tY4IgpuI1SZQ=
|
|
||||||
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
|
github.com/fsnotify/fsnotify v1.5.1 h1:mZcQUHVQUQWoPXXtuf9yuEXKudkV2sx1E06UadKWpgI=
|
||||||
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
|
github.com/fsnotify/fsnotify v1.5.1/go.mod h1:T3375wBYaZdLLcVNkcVbzGHY7f1l/uK5T5Ai1i3InKU=
|
||||||
github.com/gavv/httpexpect v2.0.0+incompatible/go.mod h1:x+9tiU1YnrOvnB725RkpoLv1M62hOWzwo5OXotisrKc=
|
github.com/getsentry/sentry-go v0.23.0 h1:dn+QRCeJv4pPt9OjVXiMcGIBIefaTJPw/h0bZWO05nE=
|
||||||
github.com/getsentry/sentry-go v0.11.0 h1:qro8uttJGvNAMr5CLcFI9CHR0aDzXl0Vs3Pmw/oTPg8=
|
github.com/getsentry/sentry-go v0.23.0/go.mod h1:lc76E2QywIyW8WuBnwl8Lc4bkmQH4+w1gwTf25trprY=
|
||||||
github.com/getsentry/sentry-go v0.11.0/go.mod h1:KBQIxiZAetw62Cj8Ri964vAEWVdgfaUCn30Q3bCvANo=
|
github.com/go-chi/chi/v5 v5.0.10 h1:rLz5avzKpjqxrYwXNfmjkrYYXOyLJd37pz53UFHC6vk=
|
||||||
github.com/gin-contrib/sse v0.0.0-20190301062529-5545eab6dad3/go.mod h1:VJ0WA2NBN22VlZ2dKZQPAPnyWw5XTlK1KymzLKsr59s=
|
github.com/go-chi/chi/v5 v5.0.10/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
||||||
github.com/gin-gonic/gin v1.4.0/go.mod h1:OW2EZn3DO8Ln9oIKOvM++LBO+5UPHJJDH72/q/3rZdM=
|
github.com/go-errors/errors v1.4.2 h1:J6MZopCL4uSllY1OfXM374weqZFFItUbrImctkmUxIA=
|
||||||
github.com/go-check/check v0.0.0-20180628173108-788fd7840127/go.mod h1:9ES+weclKsC9YodN5RgxqK/VD9HM9JsCSh7rNhMZE98=
|
github.com/go-redis/redis/v8 v8.11.5 h1:AcZZR7igkdvfVmQTPnu9WE37LRrO/YrBH5zWyjDC0oI=
|
||||||
github.com/go-chi/chi/v5 v5.0.7 h1:rDTPXLDHGATaeHvVlLcR4Qe0zftYethFucbjVQ1PxU8=
|
github.com/go-redis/redis/v8 v8.11.5/go.mod h1:gREzHqY1hg6oD9ngVRbLStwAWKhA0FEgq8Jd4h5lpwo=
|
||||||
github.com/go-chi/chi/v5 v5.0.7/go.mod h1:DslCQbL2OYiznFReuXYUmQ2hGd1aDpCnlMNITLSKoi8=
|
github.com/google/go-cmp v0.5.9 h1:O2Tfq5qg4qc4AmwVlvv0oLiVAGB7enBSJ2x2DqQFi38=
|
||||||
github.com/go-errors/errors v1.0.1 h1:LUHzmkK3GUKUrL/1gfBUxAHzcev3apQlezX/+O7ma6w=
|
|
||||||
github.com/go-errors/errors v1.0.1/go.mod h1:f4zRHt4oKfwPJE5k8C9vpYG+aDHdBFUsgrm6/TyX73Q=
|
|
||||||
github.com/go-kit/log v0.1.0/go.mod h1:zbhenjAZHb184qTLMA9ZjW7ThYL0H2mk7Q6pNt4vbaY=
|
|
||||||
github.com/go-logfmt/logfmt v0.5.0/go.mod h1:wCYkCAKZfumFQihp8CzCvQ3paCTfi41vtzG1KdI/P7A=
|
|
||||||
github.com/go-martini/martini v0.0.0-20170121215854-22fa46961aab/go.mod h1:/P9AEU963A2AYjv4d1V5eVL1CQbEJq6aCNHDDjibzu8=
|
|
||||||
github.com/go-redis/redis/v8 v8.11.4 h1:kHoYkfZP6+pe04aFTnhDH6GDROa5yJdHJVNxV3F46Tg=
|
|
||||||
github.com/go-redis/redis/v8 v8.11.4/go.mod h1:2Z2wHZXdQpCDXEGzqMockDpNyYvi2l4Pxt6RJr792+w=
|
|
||||||
github.com/go-stack/stack v1.8.0/go.mod h1:v0f6uXyyMGvRgIKkXu+yp6POWl0qKG85gN/melR3HDY=
|
|
||||||
github.com/go-task/slim-sprig v0.0.0-20210107165309-348f09dbbbc0/go.mod h1:fyg7847qk6SyHyPtNmDHnmrv/HOrqktSC+C9fM+CJOE=
|
|
||||||
github.com/gobwas/httphead v0.0.0-20180130184737-2c6c146eadee/go.mod h1:L0fX3K22YWvt/FAX9NnzrNzcI4wNYi9Yku4O0LKYflo=
|
|
||||||
github.com/gobwas/pool v0.2.0/go.mod h1:q8bcK0KcYlCgd9e7WYLm9LpyS+YeLd8JVDW6WezmKEw=
|
|
||||||
github.com/gobwas/ws v1.0.2/go.mod h1:szmBTxLgaFppYjEmNtny/v3w89xOydFnnZMcgRRu/EM=
|
|
||||||
github.com/gofrs/uuid v4.0.0+incompatible h1:1SD/1F5pU8p29ybwgQSwpQk+mwdRrXCYuPhW6m+TnJw=
|
|
||||||
github.com/gofrs/uuid v4.0.0+incompatible/go.mod h1:b2aQJv3Z4Fp6yNu3cdSllBxTCLRxnplIgP/c0N/04lM=
|
|
||||||
github.com/golang/protobuf v1.2.0/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs=
|
|
||||||
github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w=
|
|
||||||
github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0=
|
|
||||||
github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI=
|
|
||||||
github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk=
|
|
||||||
github.com/golang/protobuf v1.5.2/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY=
|
|
||||||
github.com/gomodule/redigo v1.7.1-0.20190724094224-574c33c3df38/go.mod h1:B4C85qUVwatsJoIUNIfCRsp7qO0iAmpGFZ4EELWSbC4=
|
|
||||||
github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
||||||
github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU=
|
|
||||||
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-cmp v0.5.6 h1:BKbKCqvP6I+rmFHt06ZmyQtvB8xAkWdhFyr0ZUNZcxQ=
|
|
||||||
github.com/google/go-cmp v0.5.6/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
|
|
||||||
github.com/google/go-querystring v1.0.0/go.mod h1:odCYkC5MyYFN7vkCjXpyrEuKhc/BUO6wN/zVPAxq5ck=
|
|
||||||
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg=
|
||||||
github.com/google/renameio v0.1.0/go.mod h1:KWCgfxg9yswjAJkECMjeO8J8rahYeXnNhOm40UhjYkI=
|
|
||||||
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
github.com/google/uuid v1.3.0 h1:t6JiXgmwXMjEs8VusXIJk2BXHsn+wx8BZdTaoZ5fu7I=
|
||||||
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
github.com/google/uuid v1.3.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
|
||||||
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
|
|
||||||
github.com/gorilla/websocket v1.4.1/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
|
|
||||||
github.com/hashicorp/go-version v1.2.0/go.mod h1:fltr4n8CU8Ke44wwGCBoEymUuxUHl09ZGVZPK5anwXA=
|
|
||||||
github.com/hashicorp/hcl v1.0.0/go.mod h1:E5yfLk+7swimpb2L/Alb/PJmXilQ/rhwaUYs4T20WEQ=
|
|
||||||
github.com/hpcloud/tail v1.0.0/go.mod h1:ab1qPbhIpdTxEkNHXyeSf5vhxWSCs/tWer42PpOxQnU=
|
|
||||||
github.com/imkira/go-interpol v1.1.0/go.mod h1:z0h2/2T3XF8kyEPpRgJ3kmNv+C43p+I/CoI+jC3w2iA=
|
|
||||||
github.com/inconshreveable/mousetrap v1.0.0/go.mod h1:PxqpIevigyE2G7u3NXJIT2ANytuPF1OarO4DADm73n8=
|
|
||||||
github.com/iris-contrib/blackfriday v2.0.0+incompatible/go.mod h1:UzZ2bDEoaSGPbkg6SAB4att1aAwTmVIx/5gCVqeyUdI=
|
|
||||||
github.com/iris-contrib/go.uuid v2.0.0+incompatible/go.mod h1:iz2lgM/1UnEf1kP0L/+fafWORmlnuysV2EMP8MW+qe0=
|
|
||||||
github.com/iris-contrib/jade v1.1.3/go.mod h1:H/geBymxJhShH5kecoiOCSssPX7QWYH7UaeZTSWddIk=
|
|
||||||
github.com/iris-contrib/pongo2 v0.0.1/go.mod h1:Ssh+00+3GAZqSQb30AvBRNxBx7rf0GqwkjqxNd0u65g=
|
|
||||||
github.com/iris-contrib/schema v0.0.1/go.mod h1:urYA3uvUNG1TIIjOSCzHr9/LmbQo8LrOcOqfqxa4hXw=
|
|
||||||
github.com/jackc/chunkreader v1.0.0/go.mod h1:RT6O25fNZIuasFJRyZ4R/Y2BbhasbmZXF9QQ7T3kePo=
|
|
||||||
github.com/jackc/chunkreader/v2 v2.0.0/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
|
|
||||||
github.com/jackc/chunkreader/v2 v2.0.1 h1:i+RDz65UE+mmpjTfyz0MoVTnzeYxroil2G82ki7MGG8=
|
|
||||||
github.com/jackc/chunkreader/v2 v2.0.1/go.mod h1:odVSm741yZoC3dpHEUXIqA9tQRhFrgOHwnPIn9lDKlk=
|
|
||||||
github.com/jackc/pgconn v0.0.0-20190420214824-7e0022ef6ba3/go.mod h1:jkELnwuX+w9qN5YIfX0fl88Ehu4XC3keFuOJJk9pcnA=
|
|
||||||
github.com/jackc/pgconn v0.0.0-20190824142844-760dd75542eb/go.mod h1:lLjNuW/+OfW9/pnVKPazfWOgNfH2aPem8YQ7ilXGvJE=
|
|
||||||
github.com/jackc/pgconn v0.0.0-20190831204454-2fabfa3c18b7/go.mod h1:ZJKsE/KZfsUgOEh9hBm+xYTstcNHg7UPMVJqRfQxq4s=
|
|
||||||
github.com/jackc/pgconn v1.8.0/go.mod h1:1C2Pb36bGIP9QHGBYCjnyhqu7Rv3sGshaQUvmfGIB/o=
|
|
||||||
github.com/jackc/pgconn v1.9.0/go.mod h1:YctiPyvzfU11JFxoXokUOOKQXQmDMoJL9vJzHH8/2JY=
|
|
||||||
github.com/jackc/pgconn v1.9.1-0.20210724152538-d89c8390a530/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
|
|
||||||
github.com/jackc/pgconn v1.10.0 h1:4EYhlDVEMsJ30nNj0mmgwIUXoq7e9sMJrVC2ED6QlCU=
|
|
||||||
github.com/jackc/pgconn v1.10.0/go.mod h1:4z2w8XhRbP1hYxkpTuBjTS3ne3J48K83+u0zoyvg2pI=
|
|
||||||
github.com/jackc/pgio v1.0.0 h1:g12B9UwVnzGhueNavwioyEEpAmqMe1E/BN9ES+8ovkE=
|
|
||||||
github.com/jackc/pgio v1.0.0/go.mod h1:oP+2QK2wFfUWgr+gxjoBH9KGBb31Eio69xUb0w5bYf8=
|
|
||||||
github.com/jackc/pgmock v0.0.0-20190831213851-13a1b77aafa2/go.mod h1:fGZlG77KXmcq05nJLRkk0+p82V8B8Dw8KN2/V9c/OAE=
|
|
||||||
github.com/jackc/pgmock v0.0.0-20201204152224-4fe30f7445fd/go.mod h1:hrBW0Enj2AZTNpt/7Y5rr2xe/9Mn757Wtb2xeBzPv2c=
|
|
||||||
github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65 h1:DadwsjnMwFjfWc9y5Wi/+Zz7xoE5ALHsRQlOctkOiHc=
|
|
||||||
github.com/jackc/pgmock v0.0.0-20210724152146-4ad1a8207f65/go.mod h1:5R2h2EEX+qri8jOWMbJCtaPWkrrNc7OHwsp2TCqp7ak=
|
|
||||||
github.com/jackc/pgpassfile v1.0.0 h1:/6Hmqy13Ss2zCq62VdNG8tM1wchn8zjSGOBJ6icpsIM=
|
|
||||||
github.com/jackc/pgpassfile v1.0.0/go.mod h1:CEx0iS5ambNFdcRtxPj5JhEz+xB6uRky5eyVu/W2HEg=
|
|
||||||
github.com/jackc/pgproto3 v1.1.0/go.mod h1:eR5FA3leWg7p9aeAqi37XOTgTIbkABlvcPB3E5rlc78=
|
|
||||||
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190420180111-c116219b62db/go.mod h1:bhq50y+xrl9n5mRYyCBFKkpRVTLYJVWeCc+mEAI3yXA=
|
|
||||||
github.com/jackc/pgproto3/v2 v2.0.0-alpha1.0.20190609003834-432c2951c711/go.mod h1:uH0AWtUmuShn0bcesswc4aBTWGvw0cAxIJp+6OB//Wg=
|
|
||||||
github.com/jackc/pgproto3/v2 v2.0.0-rc3/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
|
|
||||||
github.com/jackc/pgproto3/v2 v2.0.0-rc3.0.20190831210041-4c03ce451f29/go.mod h1:ryONWYqW6dqSg1Lw6vXNMXoBJhpzvWKnT95C46ckYeM=
|
|
||||||
github.com/jackc/pgproto3/v2 v2.0.6/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
|
||||||
github.com/jackc/pgproto3/v2 v2.1.1 h1:7PQ/4gLoqnl87ZxL7xjO0DR5gYuviDCZxQJsUlFW1eI=
|
|
||||||
github.com/jackc/pgproto3/v2 v2.1.1/go.mod h1:WfJCnwN3HIg9Ish/j3sgWXnAfK8A9Y0bwXYU5xKaEdA=
|
|
||||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b h1:C8S2+VttkHFdOOCXJe+YGfa4vHYwlt4Zx+IVXQ97jYg=
|
|
||||||
github.com/jackc/pgservicefile v0.0.0-20200714003250-2b9c44734f2b/go.mod h1:vsD4gTJCa9TptPL8sPkXrLZ+hDuNrZCnj29CQpr4X1E=
|
|
||||||
github.com/jackc/pgtype v0.0.0-20190421001408-4ed0de4755e0/go.mod h1:hdSHsc1V01CGwFsrv11mJRHWJ6aifDLfdV3aVjFF0zg=
|
|
||||||
github.com/jackc/pgtype v0.0.0-20190824184912-ab885b375b90/go.mod h1:KcahbBH1nCMSo2DXpzsoWOAfFkdEtEJpPbVLq8eE+mc=
|
|
||||||
github.com/jackc/pgtype v0.0.0-20190828014616-a8802b16cc59/go.mod h1:MWlu30kVJrUS8lot6TQqcg7mtthZ9T0EoIBFiJcmcyw=
|
|
||||||
github.com/jackc/pgtype v1.8.1-0.20210724151600-32e20a603178/go.mod h1:C516IlIV9NKqfsMCXTdChteoXmwgUceqaLfjg2e3NlM=
|
|
||||||
github.com/jackc/pgtype v1.8.1 h1:9k0IXtdJXHJbyAWQgbWr1lU+MEhPXZz6RIXxfR5oxXs=
|
|
||||||
github.com/jackc/pgtype v1.8.1/go.mod h1:LUMuVrfsFfdKGLw+AFFVv6KtHOFMwRgDDzBt76IqCA4=
|
|
||||||
github.com/jackc/pgx/v4 v4.0.0-20190420224344-cc3461e65d96/go.mod h1:mdxmSJJuR08CZQyj1PVQBHy9XOp5p8/SHH6a0psbY9Y=
|
|
||||||
github.com/jackc/pgx/v4 v4.0.0-20190421002000-1b8f0016e912/go.mod h1:no/Y67Jkk/9WuGR0JG/JseM9irFbnEPbuWV2EELPNuM=
|
|
||||||
github.com/jackc/pgx/v4 v4.0.0-pre1.0.20190824185557-6972a5742186/go.mod h1:X+GQnOEnf1dqHGpw7JmHqHc1NxDoalibchSk9/RWuDc=
|
|
||||||
github.com/jackc/pgx/v4 v4.12.1-0.20210724153913-640aa07df17c/go.mod h1:1QD0+tgSXP7iUjYm9C1NxKhny7lq6ee99u/z+IHFcgs=
|
|
||||||
github.com/jackc/pgx/v4 v4.13.0 h1:JCjhT5vmhMAf/YwBHLvrBn4OGdIQBiFG6ym8Zmdx570=
|
|
||||||
github.com/jackc/pgx/v4 v4.13.0/go.mod h1:9P4X524sErlaxj0XSGZk7s+LD0eOyu1ZDUrrpznYDF0=
|
|
||||||
github.com/jackc/puddle v0.0.0-20190413234325-e4ced69a3a2b/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
|
||||||
github.com/jackc/puddle v0.0.0-20190608224051-11cab39313c9/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
|
||||||
github.com/jackc/puddle v1.1.3/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
|
||||||
github.com/jackc/puddle v1.1.4 h1:5Ey/o5IfV7dYX6Znivq+N9MdK1S18OJI5OJq6EAAADw=
|
|
||||||
github.com/jackc/puddle v1.1.4/go.mod h1:m4B5Dj62Y0fbyuIc15OsIqK0+JU8nkqQjsgx7dvjSWk=
|
|
||||||
github.com/json-iterator/go v1.1.6/go.mod h1:+SdeFBvtyEkXs7REEP0seUULqWtbJapLOCVDaaPEHmU=
|
|
||||||
github.com/json-iterator/go v1.1.9/go.mod h1:KdQUCv79m/52Kvf8AW2vK1V8akMuk1QjK/uOdHXbAo4=
|
|
||||||
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
github.com/json-iterator/go v1.1.12 h1:PV8peI4a0ysnczrg+LtxykD8LfKY9ML6u2jnxaEnrnM=
|
||||||
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
github.com/json-iterator/go v1.1.12/go.mod h1:e30LSqwooZae/UwlEbR2852Gd8hjQvJoHmT4TnhNGBo=
|
||||||
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
|
github.com/klauspost/compress v1.16.7 h1:2mk3MPGNzKyxErAw8YaohYh69+pa4sIQSC0fPGCFR9I=
|
||||||
github.com/k0kubun/colorstring v0.0.0-20150214042306-9440f1994b88/go.mod h1:3w7q1U84EfirKl04SVQ/s7nPm1ZPhiXd34z40TNz36k=
|
github.com/klauspost/compress v1.16.7/go.mod h1:ntbaceVETuRiXiv4DpjP66DpAtAGkEQskQzEyD//IeE=
|
||||||
github.com/kataras/golog v0.0.10/go.mod h1:yJ8YKCmyL+nWjERB90Qwn+bdyBZsaQwU3bTVFgkFIp8=
|
|
||||||
github.com/kataras/iris/v12 v12.1.8/go.mod h1:LMYy4VlP67TQ3Zgriz8RE2h2kMZV2SgMYbq3UhfoFmE=
|
|
||||||
github.com/kataras/neffos v0.0.14/go.mod h1:8lqADm8PnbeFfL7CLXh1WHw53dG27MC3pgi2R1rmoTE=
|
|
||||||
github.com/kataras/pio v0.0.2/go.mod h1:hAoW0t9UmXi4R5Oyq5Z4irTbaTsOemSrDGUtaTl7Dro=
|
|
||||||
github.com/kataras/sitemap v0.0.5/go.mod h1:KY2eugMKiPwsJgx7+U103YZehfvNGOXURubcGyk0Bz8=
|
|
||||||
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
|
|
||||||
github.com/klauspost/compress v1.8.2/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
|
||||||
github.com/klauspost/compress v1.9.7/go.mod h1:RyIbtBH6LamlWaDj8nUwkbUhJ87Yi3uG0guNDohfE1A=
|
|
||||||
github.com/klauspost/compress v1.15.9 h1:wKRjX6JRtDdrE9qwa4b/Cip7ACOshUI4smpCQanqjSY=
|
|
||||||
github.com/klauspost/compress v1.15.9/go.mod h1:PhcZ0MbTNciWF3rruxRgKxI5NkcHHrHUDtV4Yw2GlzU=
|
|
||||||
github.com/klauspost/cpuid v1.2.1/go.mod h1:Pj4uuM528wm8OyEC2QMXAi2YiTZ96dNQPGgoMS4s3ek=
|
|
||||||
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
github.com/klauspost/cpuid/v2 v2.0.1/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
||||||
github.com/klauspost/cpuid/v2 v2.0.4/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
|
github.com/klauspost/cpuid/v2 v2.2.5 h1:0E5MSMDEoAulmXNFquVs//DdoomxaoTY1kUhbc/qbZg=
|
||||||
github.com/klauspost/cpuid/v2 v2.1.0 h1:eyi1Ad2aNJMW95zcSbmGg7Cg6cq3ADwLpMAP96d8rF0=
|
github.com/klauspost/cpuid/v2 v2.2.5/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=
|
||||||
github.com/klauspost/cpuid/v2 v2.1.0/go.mod h1:RVVoqg1df56z8g3pUjL/3lE5UfnlrJX8tyFgg4nqhuY=
|
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.1/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
|
||||||
github.com/konsorten/go-windows-terminal-sequences v1.0.2/go.mod h1:T0+1ngSBFLxvqU3pZ+m/2kptfBszLMUkC4ZK/EgS/cQ=
|
|
||||||
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
|
|
||||||
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
|
|
||||||
github.com/kr/pty v1.1.8/go.mod h1:O1sed60cT9XZ5uDucP5qwvh+TE3NnUj51EiZO/lmSfw=
|
|
||||||
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
|
|
||||||
github.com/labstack/echo/v4 v4.1.11/go.mod h1:i541M3Fj6f76NZtHSj7TXnyM8n2gaodfvfxNnFqi74g=
|
|
||||||
github.com/labstack/gommon v0.3.0/go.mod h1:MULnywXg0yavhxWKc+lOruYdAhDwPK9wf0OL7NoOu+k=
|
|
||||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0 h1:SOEGU9fKiNWd/HOJuq6+3iTQz8KNCLtVX6idSoTLdUw=
|
|
||||||
github.com/lann/builder v0.0.0-20180802200727-47ae307949d0/go.mod h1:dXGbAdH5GtBTC4WfIxhKZfyBF/HBFgRZSWwZ9g/He9o=
|
|
||||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0 h1:P6pPBnrTSX3DEVR4fDembhRWSsG5rVo6hYhAB/ADZrk=
|
|
||||||
github.com/lann/ps v0.0.0-20150810152359-62de8c46ede0/go.mod h1:vmVJ0l/dxyfGW6FmdpVm2joNMFikkuWg0EoCKLGUMNw=
|
|
||||||
github.com/lib/pq v1.0.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
|
||||||
github.com/lib/pq v1.1.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
|
||||||
github.com/lib/pq v1.2.0/go.mod h1:5WUZQaWbwv1U+lTReE5YruASi9Al49XbQIvNi/34Woo=
|
|
||||||
github.com/lib/pq v1.10.2 h1:AqzbZs4ZoCBp+GtejcpCpcxM3zlSMx29dXbUSeVtJb8=
|
|
||||||
github.com/lib/pq v1.10.2/go.mod h1:AlVN5x4E4T544tWzH6hKfbfQvm3HdbOxrmggDNAPY9o=
|
|
||||||
github.com/magiconair/properties v1.8.0/go.mod h1:PppfXfuXeibc/6YijjN8zIbojt8czPbwD3XqdrwzmxQ=
|
|
||||||
github.com/mattn/go-colorable v0.1.1/go.mod h1:FuOcm+DKB9mbwrcAfNl7/TZVBZ6rcnceauSikq3lYCQ=
|
|
||||||
github.com/mattn/go-colorable v0.1.2/go.mod h1:U0ppj6V5qS13XJ6of8GYAs25YV2eR4EVcfRqFIhoBtE=
|
|
||||||
github.com/mattn/go-colorable v0.1.6/go.mod h1:u6P/XSegPjTcexA+o6vUJrdnUu04hMope9wVRipJSqc=
|
|
||||||
github.com/mattn/go-isatty v0.0.5/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
|
||||||
github.com/mattn/go-isatty v0.0.7/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
|
||||||
github.com/mattn/go-isatty v0.0.8/go.mod h1:Iq45c/XA43vh69/j3iqttzPXn0bhXyGjM0Hdxcsrc5s=
|
|
||||||
github.com/mattn/go-isatty v0.0.9/go.mod h1:YNRxwqDuOph6SZLI9vUUz6OYw3QyUt7WiY2yME+cCiQ=
|
|
||||||
github.com/mattn/go-isatty v0.0.12/go.mod h1:cbi8OIDigv2wuxKPP5vlRcQ1OAZbq2CE4Kysco4FUpU=
|
|
||||||
github.com/mattn/goveralls v0.0.2/go.mod h1:8d1ZMHsd7fW6IRPKQh46F2WRpyib5/X4FOpevwGNQEw=
|
|
||||||
github.com/mediocregopher/radix/v3 v3.4.2/go.mod h1:8FL3F6UQRXHXIBSPUs5h0RybMF8i4n7wVopoX3x7Bv8=
|
|
||||||
github.com/microcosm-cc/bluemonday v1.0.2/go.mod h1:iVP4YcDBq+n/5fb23BhYFvIMq/leAFZyRl6bYmGDlGc=
|
|
||||||
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
github.com/minio/md5-simd v1.1.2 h1:Gdi1DZK69+ZVMoNHRXJyNcxrMA4dSxoYHZSQbirFg34=
|
||||||
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
github.com/minio/md5-simd v1.1.2/go.mod h1:MzdKDxYpY2BT9XQFocsiZf/NKVtR7nkE4RoEpN+20RM=
|
||||||
github.com/minio/minio-go/v7 v7.0.35 h1:JuPPxWLdxQmNLSaS8AWZnO5HBadeI1xg6FGrEELQEVU=
|
github.com/minio/minio-go/v7 v7.0.61 h1:87c+x8J3jxQ5VUGimV9oHdpjsAvy3fhneEBKuoKEVUI=
|
||||||
github.com/minio/minio-go/v7 v7.0.35/go.mod h1:nCrRzjoSUQh8hgKKtu3Y708OLvRLtuASMg2/nvmbarw=
|
github.com/minio/minio-go/v7 v7.0.61/go.mod h1:BTu8FcrEw+HidY0zd/0eny43QnVNkXRPXrLXFuQBHXg=
|
||||||
github.com/minio/sha256-simd v1.0.0 h1:v1ta+49hkWZyvaKwrQB8elexRqm6Y0aMLjCNsrYxo6g=
|
github.com/minio/sha256-simd v1.0.1 h1:6kaan5IFmwTNynnKKpDHe6FWHohJOHhCPchzK49dzMM=
|
||||||
github.com/minio/sha256-simd v1.0.0/go.mod h1:OuYzVNI5vcoYIAmbIvHPl3N3jUzVedXbKy5RFepssQM=
|
github.com/minio/sha256-simd v1.0.1/go.mod h1:Pz6AKMiUdngCLpeTL/RJY1M9rUuPMYujV5xJjtbRSN8=
|
||||||
github.com/mitchellh/go-homedir v1.1.0/go.mod h1:SfyaCUpYCn1Vlf4IUYiD9fPX4A5wJrkLzIz1N1q0pr0=
|
|
||||||
github.com/mitchellh/mapstructure v1.1.2/go.mod h1:FVVH3fgwuzCH5S8UJGiWEs2h04kUh9fWfEaFds41c1Y=
|
|
||||||
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180228061459-e0a39a4cb421/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd h1:TRLaZ9cD/w8PVh93nsPXa1VrQ6jlwL5oN8l14QlcNfg=
|
||||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd/go.mod h1:6dJC0mAP4ikYIbvyc7fijjWJddQyLn8Ig3JB5CqoB9Q=
|
||||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
|
||||||
github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0=
|
|
||||||
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
github.com/modern-go/reflect2 v1.0.2 h1:xBagoLtFs94CBntxluKeaWgTMpvLxC4ur3nMaC9Gz0M=
|
||||||
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
github.com/modern-go/reflect2 v1.0.2/go.mod h1:yWuevngMOJpCy52FWWMvUC8ws7m/LJsjYzDa0/r8luk=
|
||||||
github.com/moul/http2curl v1.0.0/go.mod h1:8UbvGypXm98wA/IqH45anm5Y2Z6ep6O31QGOAZ3H0fQ=
|
|
||||||
github.com/nats-io/jwt v0.3.0/go.mod h1:fRYCDE99xlTsqUzISS1Bi75UBJ6ljOJQOAAu5VglpSg=
|
|
||||||
github.com/nats-io/nats.go v1.9.1/go.mod h1:ZjDU1L/7fJ09jvUSRVBR2e7+RnLiiIQyqyzEE/Zbp4w=
|
|
||||||
github.com/nats-io/nkeys v0.1.0/go.mod h1:xpnFELMwJABBLVhffcfd1MZx6VsNRFpEugbxziKVo7w=
|
|
||||||
github.com/nats-io/nuid v1.0.1/go.mod h1:19wcPz3Ph3q0Jbyiqsd0kePYG7A95tJPxeL+1OSON2c=
|
|
||||||
github.com/nxadm/tail v1.4.4/go.mod h1:kenIhsEOeOJmVchQTgglprH7qJGnHDVpk1VPCcaMI8A=
|
|
||||||
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
github.com/nxadm/tail v1.4.8 h1:nPr65rt6Y5JFSKQO7qToXr7pePgD6Gwiw05lkbyAQTE=
|
||||||
github.com/nxadm/tail v1.4.8/go.mod h1:+ncqLTQzXmGhMZNUePPaPqPvBxHAIsmXswZKocGu+AU=
|
github.com/onsi/ginkgo v1.16.5 h1:8xi0RTUf59SOSfEtZMvwTvXYMzG4gV23XVHOZiXNtnE=
|
||||||
github.com/onsi/ginkgo v1.6.0/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
github.com/onsi/gomega v1.18.1 h1:M1GfJqGRrBrrGGsbxzV5dqM2U2ApXefZCQpkukxYRLE=
|
||||||
github.com/onsi/ginkgo v1.10.3/go.mod h1:lLunBs/Ym6LB5Z9jYTR76FiuTmxDTDusOGeTQH+WWjE=
|
|
||||||
github.com/onsi/ginkgo v1.12.1/go.mod h1:zj2OWP4+oCPe1qIXoGWkgMRwljMUYCdkwsT2108oapk=
|
|
||||||
github.com/onsi/ginkgo v1.16.4 h1:29JGrr5oVBm5ulCWet69zQkzWipVXIol6ygQUe/EzNc=
|
|
||||||
github.com/onsi/ginkgo v1.16.4/go.mod h1:dX+/inL/fNMqNlz0e9LfyB9TswhZpCVdJM/Z6Vvnwo0=
|
|
||||||
github.com/onsi/gomega v1.7.1/go.mod h1:XdKZgCCFLUoM/7CFJVPcG8C1xQ1AJ0vpAezJrB7JYyY=
|
|
||||||
github.com/onsi/gomega v1.10.1/go.mod h1:iN09h71vgCQne3DLsj+A5owkum+a2tYe+TOCB1ybHNo=
|
|
||||||
github.com/onsi/gomega v1.16.0 h1:6gjqkI8iiRHMvdccRJM8rVKjCWk6ZIm6FTm3ddIe4/c=
|
|
||||||
github.com/onsi/gomega v1.16.0/go.mod h1:HnhC7FXeEQY45zxNK3PPoIUhzk/80Xly9PcubAlGdZY=
|
|
||||||
github.com/pelletier/go-toml v1.2.0/go.mod h1:5z9KED0ma1S8pY6P1sdut58dfprrGBbd/94hg7ilaic=
|
|
||||||
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
|
github.com/pingcap/errors v0.11.4 h1:lFuQV/oaUMGcD2tqt+01ROSmJs75VG1ToEOkZIZ4nE4=
|
||||||
github.com/pingcap/errors v0.11.4/go.mod h1:Oi8TUi2kEtXXLMJk9l1cGmz20kV3TaQ0usTwv5KuLY8=
|
|
||||||
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
github.com/pkg/errors v0.9.1 h1:FEBLx1zS214owpjy7qsBeixbURkuhQAwrK5UwLGTwt4=
|
||||||
github.com/pkg/errors v0.9.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
|
|
||||||
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
|
||||||
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
|
||||||
github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7 h1:xoIK0ctDddBMnc74udxJYBqlo9Ylnsp1waqjLsnef20=
|
github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7 h1:xoIK0ctDddBMnc74udxJYBqlo9Ylnsp1waqjLsnef20=
|
||||||
github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
|
github.com/pquerna/ffjson v0.0.0-20190930134022-aa0246cd15f7/go.mod h1:YARuvh7BUWHNhzDq2OM5tzR2RiCcN2D7sapiKyCel/M=
|
||||||
github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFRclV5y23lUDJ4=
|
github.com/rs/cors v1.9.0 h1:l9HGsTsHJcvW14Nk7J9KFz8bzeAWXn3CG6bgt7LsrAE=
|
||||||
github.com/rs/cors v1.8.2 h1:KCooALfAYGs415Cwu5ABvv9n9509fSiG5SQJn/AQo4U=
|
github.com/rs/cors v1.9.0/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
||||||
github.com/rs/cors v1.8.2/go.mod h1:XyqrcTp5zjWr1wsJ8PIRZssZ8b/WMcMf71DJnit4EMU=
|
github.com/rs/xid v1.5.0 h1:mKX4bl4iPYJtEIxp6CYiUuLQ/8DYMoz0PUdtGgMFRVc=
|
||||||
github.com/rs/xid v1.2.1/go.mod h1:+uKXf+4Djp6Md1KODXJxgGQPKngRmWyn10oCKFzNHOQ=
|
github.com/rs/xid v1.5.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
||||||
github.com/rs/xid v1.4.0 h1:qd7wPTDkN6KQx2VmMBLrpHkiyQwgFXRnkOLacUiaSNY=
|
github.com/sirupsen/logrus v1.9.3 h1:dueUQJ1C2q9oE3F7wvmSGAaVtTmUizReu6fjN8uqzbQ=
|
||||||
github.com/rs/xid v1.4.0/go.mod h1:trrq9SKmegXys3aeAKXMUTdJsYXVwGY3RLcfgqegfbg=
|
github.com/sirupsen/logrus v1.9.3/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
||||||
github.com/rs/zerolog v1.13.0/go.mod h1:YbFCdg8HfsridGWAh22vktObvhZbQsZXe4/zB0OKkWU=
|
|
||||||
github.com/rs/zerolog v1.15.0/go.mod h1:xYTKnLHcpfU2225ny5qZjxnj9NvkumZYjJHlAThCjNc=
|
|
||||||
github.com/russross/blackfriday v1.5.2/go.mod h1:JO/DiYxRf+HjHt06OyowR9PTA263kcR/rfWxYHBV53g=
|
|
||||||
github.com/ryanuber/columnize v2.1.0+incompatible/go.mod h1:sm1tb6uqfes/u+d4ooFouqFdy9/2g9QGwK3SQygK0Ts=
|
|
||||||
github.com/satori/go.uuid v1.2.0/go.mod h1:dA0hQrYB0VpLJoorglMZABFdXlWrHn1NEOzdhQKdks0=
|
|
||||||
github.com/schollz/closestmatch v2.1.0+incompatible/go.mod h1:RtP1ddjLong6gTkbtmuhtR2uUrrJOpYzYRvbcPAid+g=
|
|
||||||
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
|
|
||||||
github.com/shopspring/decimal v0.0.0-20180709203117-cd690d0c9e24/go.mod h1:M+9NzErvs504Cn4c5DxATwIqPbtswREoFCre64PpcG4=
|
|
||||||
github.com/shopspring/decimal v1.2.0 h1:abSATXmQEYyShuxI4/vyW3tV1MrKAJzCZ/0zLUXYbsQ=
|
|
||||||
github.com/shopspring/decimal v1.2.0/go.mod h1:DKyhrW/HYNuLGql+MJL6WCR6knT2jwCFRcu2hWCYk4o=
|
|
||||||
github.com/shurcooL/sanitized_anchor_name v1.0.0/go.mod h1:1NzhyTcUVG4SuEtjjoZeVRXNmyL/1OwPU0+IJeTBvfc=
|
|
||||||
github.com/sirupsen/logrus v1.4.1/go.mod h1:ni0Sbl8bgC9z8RoU9G6nDWqqs/fq4eDPysMBDgk/93Q=
|
|
||||||
github.com/sirupsen/logrus v1.4.2/go.mod h1:tLMulIdttU9McNUspp0xgXVQah82FyeX6MwdIuYE2rE=
|
|
||||||
github.com/sirupsen/logrus v1.9.0 h1:trlNQbNUG3OdDrDil03MCb1H2o9nJ1x4/5LYw7byDE0=
|
|
||||||
github.com/sirupsen/logrus v1.9.0/go.mod h1:naHLuLoDiP4jHNo9R0sCBMtWGeIprob74mVsIT4qYEQ=
|
|
||||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
|
|
||||||
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
|
|
||||||
github.com/spf13/afero v1.1.2/go.mod h1:j4pytiNVoe2o6bmDsKpLACNPDBIoEAkihy7loJ1B0CQ=
|
|
||||||
github.com/spf13/cast v1.3.0/go.mod h1:Qx5cxh0v+4UWYiBimWS+eyWzqEqokIECu5etghLkUJE=
|
|
||||||
github.com/spf13/cobra v0.0.5/go.mod h1:3K3wKZymM7VvHMDS9+Akkh4K60UwM26emMESw8tLCHU=
|
|
||||||
github.com/spf13/jwalterweatherman v1.0.0/go.mod h1:cQK4TGJAtQXfYWX+Ddv3mKDzgVb68N+wFjFa4jdeBTo=
|
|
||||||
github.com/spf13/pflag v1.0.3/go.mod h1:DYY7MBk1bdzusC3SYhjObp+wFpr4gzcvqqNjLnInEg4=
|
|
||||||
github.com/spf13/viper v1.3.2/go.mod h1:ZiWeW+zYFKm7srdB9IoDzzZXaJaI5eL9QjNiN/DMA2s=
|
|
||||||
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
||||||
github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
|
|
||||||
github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
|
|
||||||
github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
|
|
||||||
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
|
||||||
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
|
|
||||||
github.com/stretchr/testify v1.5.1/go.mod h1:5W2xD1RspED5o8YsWQXVCued0rvSQ+mT+I5cxcmMvtA=
|
|
||||||
github.com/stretchr/testify v1.7.0 h1:nwc3DEeHmmLAfoZucVR881uASk0Mfjw8xYJ99tb5CcY=
|
|
||||||
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
github.com/stretchr/testify v1.7.0/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg=
|
||||||
github.com/ugorji/go v1.1.4/go.mod h1:uQMGLiO92mf5W77hV/PUCpI3pbzQx3CRekS0kk+RGrc=
|
github.com/stretchr/testify v1.8.2 h1:+h33VjcLVPDHtOdpUCuF+7gSuG3yGIftsP1YvFihtJ8=
|
||||||
github.com/ugorji/go v1.1.7/go.mod h1:kZn38zHttfInRq0xu/PH0az30d+z6vm202qpg1oXVMw=
|
golang.org/x/crypto v0.11.0 h1:6Ewdq3tDic1mg5xRO4milcWCfMVQhI4NkqWWvqejpuA=
|
||||||
github.com/ugorji/go/codec v0.0.0-20181204163529-d75b2dcb6bc8/go.mod h1:VFNgLljTbGfSG7qAOspJ7OScBnGdDN/yBr0sguwnwf0=
|
golang.org/x/crypto v0.11.0/go.mod h1:xgJhtzW8F9jGdVFWZESrid1U1bjeNy4zgy5cRr/CIio=
|
||||||
github.com/ugorji/go/codec v1.1.7/go.mod h1:Ax+UKWsSmolVDwsd+7N3ZtXu+yMGCf907BLYF3GoBXY=
|
golang.org/x/net v0.12.0 h1:cfawfvKITfUsFCeJIHJrbSxpeu/E81khclypR0GVT50=
|
||||||
github.com/urfave/negroni v1.0.0/go.mod h1:Meg73S6kFm/4PpbYdq35yYWoCZ9mS/YSx+lKnmiohz4=
|
golang.org/x/net v0.12.0/go.mod h1:zEVYFnQC7m/vmpQFELhcD1EWkZlX69l4oqgmer6hfKA=
|
||||||
github.com/valyala/bytebufferpool v1.0.0/go.mod h1:6bBcMArwyJ5K/AmCkWv1jt77kVWyCJ6HpOuEn7z0Csc=
|
|
||||||
github.com/valyala/fasthttp v1.6.0/go.mod h1:FstJa9V+Pj9vQ7OJie2qMHdwemEDaDiSdBnvPM1Su9w=
|
|
||||||
github.com/valyala/fasttemplate v1.0.1/go.mod h1:UQGH1tvbgY+Nz5t2n7tXsz52dQxojPUpymEIMZ47gx8=
|
|
||||||
github.com/valyala/tcplisten v0.0.0-20161114210144-ceec8f93295a/go.mod h1:v3UYOV9WzVtRmSR+PDvWpU/qWl4Wa5LApYYX4ZtKbio=
|
|
||||||
github.com/xeipuuv/gojsonpointer v0.0.0-20180127040702-4e3ac2762d5f/go.mod h1:N2zxlSyiKSe5eX1tZViRH5QA0qijqEDrYZiPEAiq3wU=
|
|
||||||
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415/go.mod h1:GwrjFmJcFw6At/Gs6z4yjiIwzuJ1/+UwLxMQDVQXShQ=
|
|
||||||
github.com/xeipuuv/gojsonschema v1.2.0/go.mod h1:anYRn/JVcOK2ZgGU+IjEV4nwlhoK5sQluxsYJ78Id3Y=
|
|
||||||
github.com/xordataexchange/crypt v0.0.3-0.20170626215501-b2862e3d0a77/go.mod h1:aYKd//L2LvnjZzWKhF00oedf4jCCReLcmhLdhm1A27Q=
|
|
||||||
github.com/yalp/jsonpath v0.0.0-20180802001716-5cc68e5049a0/go.mod h1:/LWChgwKmvncFJFHJ7Gvn9wZArjbV5/FppcK2fKk/tI=
|
|
||||||
github.com/yudai/gojsondiff v1.0.0/go.mod h1:AY32+k2cwILAkW1fbgxQ5mUmMiZFgLIV+FBNExI05xg=
|
|
||||||
github.com/yudai/golcs v0.0.0-20170316035057-ecda9a501e82/go.mod h1:lgjkn3NuSvDfVJdfcVVdX+jpBxNmX4rDAzaS45IcYoM=
|
|
||||||
github.com/yudai/pp v2.0.1+incompatible/go.mod h1:PuxR/8QJ7cyCkFp/aUDS+JY727OFEZkTdatxwunjIkc=
|
|
||||||
github.com/yuin/goldmark v1.2.1/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74=
|
|
||||||
github.com/zenazn/goji v0.9.0/go.mod h1:7S9M489iMyHBNxwZnk9/EHS098H4/F6TATF2mIxtB1Q=
|
|
||||||
go.uber.org/atomic v1.3.2/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
|
||||||
go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE=
|
|
||||||
go.uber.org/atomic v1.5.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
|
||||||
go.uber.org/atomic v1.6.0/go.mod h1:sABNBOSYdrvTF6hTgEIbc7YasKWGhgEQZyfxyTvoXHQ=
|
|
||||||
go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/0=
|
|
||||||
go.uber.org/multierr v1.3.0/go.mod h1:VgVr7evmIr6uPjLBxg28wmKNXyqE9akIJ5XnfpiKl+4=
|
|
||||||
go.uber.org/multierr v1.5.0/go.mod h1:FeouvMocqHpRaaGuG9EjoKcStLC43Zu/fmqdUMPcKYU=
|
|
||||||
go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee/go.mod h1:vJERXedbb3MVM5f9Ejo0C68/HhF8uaILCdgjnY+goOA=
|
|
||||||
go.uber.org/zap v1.9.1/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
|
||||||
go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q=
|
|
||||||
go.uber.org/zap v1.13.0/go.mod h1:zwrFLgMcdUuIBviXEYEH1YKNaOBnKXsx2IPda5bBwHM=
|
|
||||||
golang.org/x/crypto v0.0.0-20181203042331-505ab145d0a9/go.mod h1:6SG95UA2DQfeDnfUPMdvaQW0Q7yPrPDi9nlGo2tz2b4=
|
|
||||||
golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACkg1iLfiJU5Ep61QUkGW8qpdssI0+w=
|
|
||||||
golang.org/x/crypto v0.0.0-20190411191339-88737f569e3a/go.mod h1:WFFai1msRO1wXaEeE5yQxYXgSfI8pQAWXbQop6sCtWE=
|
|
||||||
golang.org/x/crypto v0.0.0-20190510104115-cbcb75029529/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
||||||
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
||||||
golang.org/x/crypto v0.0.0-20190820162420-60c769a6c586/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
||||||
golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI=
|
|
||||||
golang.org/x/crypto v0.0.0-20191227163750-53104e6ec876/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
|
||||||
golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto=
|
|
||||||
golang.org/x/crypto v0.0.0-20201203163018-be400aefbc4c/go.mod h1:jdWPYTVW3xRLrWPugEBEK3UY2ZEsg3UU495nc5E+M+I=
|
|
||||||
golang.org/x/crypto v0.0.0-20210616213533-5ff15b29337e/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
|
||||||
golang.org/x/crypto v0.0.0-20210711020723-a769d52b0f97/go.mod h1:GvvjBRRGRdwPK5ydBHafDWAxML/pGHZbMvKqRZ5+Abc=
|
|
||||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa h1:zuSxTR4o9y82ebqCUJYNGJbGPo6sKVl54f/TVDObg1c=
|
|
||||||
golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4=
|
|
||||||
golang.org/x/lint v0.0.0-20190930215403-16217165b5de/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc=
|
|
||||||
golang.org/x/mod v0.0.0-20190513183733-4bf6d317e70e/go.mod h1:mXi4GBBbnImb6dmsKGUJ2LatrhH/nqhxcFungHvyanc=
|
|
||||||
golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg=
|
|
||||||
golang.org/x/mod v0.3.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA=
|
|
||||||
golang.org/x/net v0.0.0-20180906233101-161cd47e91fd/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20181220203305-927f97764cc3/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4=
|
|
||||||
golang.org/x/net v0.0.0-20190311183353-d8887717615a/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190327091125-710a502c58a2/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190404232315-eb5bcb51f2a3/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg=
|
|
||||||
golang.org/x/net v0.0.0-20190620200207-3b0461eec859/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20190813141303-74dc4d7220e7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s=
|
|
||||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
|
|
||||||
golang.org/x/net v0.0.0-20201021035429-f5854403a974/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU=
|
|
||||||
golang.org/x/net v0.0.0-20210226172049-e18ecbb05110/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg=
|
|
||||||
golang.org/x/net v0.0.0-20210428140749-89ef3d95e781/go.mod h1:OJAsFXCWl8Ukc7SiCT/9KSuxbyM7479/AVlXFRxuMCk=
|
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b h1:PxfKdU9lEEDYjdIzOtC4qFWgkU2rGHdKlKowJSMN9h0=
|
|
||||||
golang.org/x/net v0.0.0-20220722155237-a158d28d115b/go.mod h1:XRhObCWvk6IyKnWLug+ECip1KBveYUHfp+8e9klMJ9c=
|
|
||||||
golang.org/x/sync v0.0.0-20180314180146-1d60e4601c6f/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190423024810-112230192c58/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sync v0.0.0-20201020160332-67f06af15bc9/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM=
|
|
||||||
golang.org/x/sys v0.0.0-20180905080454-ebe1bf3edb33/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20180909124046-d0be0721c37e/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20181205085412-a5c9d58dba9a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190215142949-d0b11bdaac8a/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190222072716-a9d3bda3a223/go.mod h1:STP8DvDyc/dI5b8T5hshtkjS+E42TnysNCUPdjciGhY=
|
|
||||||
golang.org/x/sys v0.0.0-20190403152447-81d4e9dc473e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190412213103-97732733099d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190422165155-953cdadca894/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190626221950-04f50cda93cb/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190813064441-fde4db37ae7a/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20190904154756-749cb33beabd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20191005200804-aed5e4c7ecf9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200116001909-b77594299b42/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20200930185726-fdedc70b468f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210112080510-489259a85091/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
|
||||||
golang.org/x/sys v0.0.0-20210615035016-665e8c7367d1/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20210630005230-0f9fa26af87c/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220704084225-05e143d24a9e/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
|
||||||
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.0.0-20220715151400-c0bba94af5f8/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f h1:v4INt8xihDGvnrfjMDVXGxw9wrfxYyCjk0KbXjhR55s=
|
golang.org/x/sys v0.5.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/sys v0.0.0-20220722155257-8c9f86f7a55f/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
golang.org/x/sys v0.10.0 h1:SqMFp9UcQJZa+pmYuAKjd9xq1f0j5rLcDIk0mj4qAsA=
|
||||||
golang.org/x/term v0.0.0-20201117132131-f5c789dd3221/go.mod h1:Nr5EML6q2oocZ2LXRh80K7BxOlk5/8JxuGnuhpl+muw=
|
golang.org/x/sys v0.10.0/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||||
golang.org/x/term v0.0.0-20201126162022-7de9c90e9dd1/go.mod h1:bj7SfCRtBDWHUb9snDiAeCFNEtKQo2Wmx5Cou7ajbmo=
|
golang.org/x/text v0.11.0 h1:LAntKIrcmeSKERyiOh0XMV39LXS8IE9UL2yP7+f5ij4=
|
||||||
golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ=
|
golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE=
|
||||||
golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk=
|
|
||||||
golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
||||||
golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
||||||
golang.org/x/text v0.3.6/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ=
|
|
||||||
golang.org/x/text v0.3.7 h1:olpwvP2KacW1ZWvsR7uQhoyTYvKAupfQrRGBFM352Gk=
|
|
||||||
golang.org/x/text v0.3.7/go.mod h1:u+2+/6zg+i71rQMx5EYifcz6MCKuco9NR6JIITiCfzQ=
|
|
||||||
golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20181221001348-537d06c36207/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ=
|
|
||||||
golang.org/x/tools v0.0.0-20190311212946-11955173bddd/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20190327201419-c70d86f8b7cf/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20190328211700-ab21143f2384/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs=
|
|
||||||
golang.org/x/tools v0.0.0-20190425163242-31fd60d6bfdc/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q=
|
|
||||||
golang.org/x/tools v0.0.0-20190621195816-6e04913cbbac/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc=
|
|
||||||
golang.org/x/tools v0.0.0-20190823170909-c4a336ef6a2f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.0.0-20191029041327-9cc4af7d6b2c/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.0.0-20191029190741-b9c20aec41a5/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.0.0-20191119224855-298f0cb1881e/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo=
|
|
||||||
golang.org/x/tools v0.0.0-20200103221440-774c71fcf114/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28=
|
|
||||||
golang.org/x/tools v0.0.0-20201224043029-2b0845dc783e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190410155217-1f06c39b4373/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190513163551-3ee3066db522/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
|
|
||||||
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0=
|
|
||||||
google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM=
|
|
||||||
google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE=
|
|
||||||
google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo=
|
|
||||||
google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU=
|
|
||||||
google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw=
|
|
||||||
google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc=
|
|
||||||
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
||||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
|
gopkg.in/ini.v1 v1.67.0 h1:Dgnx+6+nfE+IfzjUEISNeydPJh9AXNNsWbGP9KzCsOA=
|
||||||
gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI=
|
gopkg.in/ini.v1 v1.67.0/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
||||||
gopkg.in/fsnotify.v1 v1.4.7/go.mod h1:Tz8NjZHkW78fSQdbUxIjBTcgA1z1m8ZHf0WmKUhAMys=
|
|
||||||
gopkg.in/go-playground/assert.v1 v1.2.1/go.mod h1:9RXL0bg/zibRAgZUYszZSwO/z8Y/a8bDuhia5mkpMnE=
|
|
||||||
gopkg.in/go-playground/validator.v8 v8.18.2/go.mod h1:RX2a/7Ha8BgOhfk7j780h4/u/RRjR0eouCJSH80/M2Y=
|
|
||||||
gopkg.in/inconshreveable/log15.v2 v2.0.0-20180818164646-67afb5ed74ec/go.mod h1:aPpfJ7XW+gOuirDoZ8gHhLh3kZ1B08FtV2bbmy7Jv3s=
|
|
||||||
gopkg.in/ini.v1 v1.51.1/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
|
||||||
gopkg.in/ini.v1 v1.66.6 h1:LATuAqN/shcYAOkv3wl2L4rkaKqkcgTBQjOyYDvcPKI=
|
|
||||||
gopkg.in/ini.v1 v1.66.6/go.mod h1:pNLf8WUiyNEtQjuu5G5vTm06TEv9tsIgeAvK8hOrP4k=
|
|
||||||
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
|
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7 h1:uRGJdciOHaEIrze2W8Q3AKkepLTh2hOroT7a+7czfdQ=
|
||||||
gopkg.in/tomb.v1 v1.0.0-20141024135613-dd632973f1e7/go.mod h1:dt/ZhP58zS4L8KSrWDmTeBkI65Dw0HsyUHuEVlX15mw=
|
|
||||||
gopkg.in/yaml.v2 v2.2.2/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.2.4/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.3.0/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI=
|
|
||||||
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
|
||||||
gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
|
|
||||||
gopkg.in/yaml.v3 v3.0.0-20191120175047-4206685974f2/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
||||||
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b h1:h8qDotaEPuJATrMmW04NCwg7v22aHH28wwpauUhK9Oo=
|
gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
|
||||||
gopkg.in/yaml.v3 v3.0.0-20210107192922-496545a6307b/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
|
|
||||||
honnef.co/go/tools v0.0.1-2019.2.3/go.mod h1:a3bituU0lyd329TUQxRnasdCoJDkEUEAqEt0JzvZhAg=
|
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package joke
|
package joke
|
||||||
|
|
||||||
import (
|
import (
|
||||||
core "jokes-bapak2-api/core/joke"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
core "jokes-bapak2-api/core/joke"
|
||||||
|
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/go-chi/chi/v5"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package joke
|
package joke
|
||||||
|
|
||||||
import (
|
import (
|
||||||
core "jokes-bapak2-api/core/joke"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
|
||||||
|
core "jokes-bapak2-api/core/joke"
|
||||||
)
|
)
|
||||||
|
|
||||||
// TotalJokes provides a HTTP handler for acquiring total jokes
|
// TotalJokes provides a HTTP handler for acquiring total jokes
|
||||||
|
|
363
api/main.go
363
api/main.go
|
@ -1,182 +1,181 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"context"
|
||||||
"log"
|
"errors"
|
||||||
"net"
|
"log"
|
||||||
"net/http"
|
"net"
|
||||||
"os"
|
"net/http"
|
||||||
"os/signal"
|
"os"
|
||||||
|
"os/signal"
|
||||||
"context"
|
"time"
|
||||||
"jokes-bapak2-api/core/joke"
|
|
||||||
"jokes-bapak2-api/routes"
|
"jokes-bapak2-api/core/joke"
|
||||||
|
"jokes-bapak2-api/routes"
|
||||||
"github.com/go-redis/redis/v8"
|
|
||||||
"github.com/minio/minio-go/v7"
|
"github.com/go-redis/redis/v8"
|
||||||
"github.com/minio/minio-go/v7/pkg/credentials"
|
"github.com/minio/minio-go/v7"
|
||||||
|
"github.com/minio/minio-go/v7/pkg/credentials"
|
||||||
"time"
|
|
||||||
|
"github.com/allegro/bigcache/v3"
|
||||||
"github.com/allegro/bigcache/v3"
|
"github.com/getsentry/sentry-go"
|
||||||
"github.com/getsentry/sentry-go"
|
"github.com/go-chi/chi/v5"
|
||||||
"github.com/go-chi/chi/v5"
|
"github.com/rs/cors"
|
||||||
"github.com/rs/cors"
|
)
|
||||||
)
|
|
||||||
|
func main() {
|
||||||
func main() {
|
redisURL, ok := os.LookupEnv("REDIS_URL")
|
||||||
redisURL, ok := os.LookupEnv("REDIS_URL")
|
if !ok {
|
||||||
if !ok {
|
redisURL = "redis://@localhost:6379"
|
||||||
redisURL = "redis://@localhost:6379"
|
}
|
||||||
}
|
|
||||||
|
minioHost, ok := os.LookupEnv("MINIO_HOST")
|
||||||
minioHost, ok := os.LookupEnv("MINIO_HOST")
|
if !ok {
|
||||||
if !ok {
|
minioHost = "localhost:9000"
|
||||||
minioHost = "localhost:9000"
|
}
|
||||||
}
|
|
||||||
|
minioRegion, ok := os.LookupEnv("MINIO_REGION")
|
||||||
minioRegion, ok := os.LookupEnv("MINIO_REGION")
|
if !ok {
|
||||||
if !ok {
|
minioRegion = ""
|
||||||
minioRegion = ""
|
}
|
||||||
}
|
|
||||||
|
minioSecure, ok := os.LookupEnv("MINIO_SECURE")
|
||||||
minioSecure, ok := os.LookupEnv("MINIO_SECURE")
|
if !ok {
|
||||||
if !ok {
|
minioSecure = "false"
|
||||||
minioSecure = "false"
|
}
|
||||||
}
|
|
||||||
|
minioID, ok := os.LookupEnv("MINIO_ACCESS_ID")
|
||||||
minioID, ok := os.LookupEnv("MINIO_ACCESS_ID")
|
if !ok {
|
||||||
if !ok {
|
minioID = "minio"
|
||||||
minioID = "minio"
|
}
|
||||||
}
|
|
||||||
|
minioSecret, ok := os.LookupEnv("MINIO_SECRET_KEY")
|
||||||
minioSecret, ok := os.LookupEnv("MINIO_SECRET_KEY")
|
if !ok {
|
||||||
if !ok {
|
minioSecret = "password"
|
||||||
minioSecret = "password"
|
}
|
||||||
}
|
|
||||||
|
minioToken, ok := os.LookupEnv("MINIO_TOKEN")
|
||||||
minioToken, ok := os.LookupEnv("MINIO_TOKEN")
|
if !ok {
|
||||||
if !ok {
|
minioToken = ""
|
||||||
minioToken = ""
|
}
|
||||||
}
|
|
||||||
|
sentryDsn, ok := os.LookupEnv("SENTRY_DSN")
|
||||||
sentryDsn, ok := os.LookupEnv("SENTRY_DSN")
|
if !ok {
|
||||||
if !ok {
|
sentryDsn = ""
|
||||||
sentryDsn = ""
|
}
|
||||||
}
|
|
||||||
|
port, ok := os.LookupEnv("PORT")
|
||||||
port, ok := os.LookupEnv("PORT")
|
if !ok {
|
||||||
if !ok {
|
port = "5000"
|
||||||
port = "5000"
|
}
|
||||||
}
|
|
||||||
|
hostname, ok := os.LookupEnv("HOSTNAME")
|
||||||
hostname, ok := os.LookupEnv("HOSTNAME")
|
if !ok {
|
||||||
if !ok {
|
hostname = "127.0.0.1"
|
||||||
hostname = "127.0.0.1"
|
}
|
||||||
}
|
|
||||||
|
environment, ok := os.LookupEnv("ENVIRONMENT")
|
||||||
environment, ok := os.LookupEnv("ENVIRONMENT")
|
if !ok {
|
||||||
if !ok {
|
environment = "development"
|
||||||
environment = "development"
|
}
|
||||||
}
|
|
||||||
|
// Setup In Memory
|
||||||
// Setup In Memory
|
memory, err := bigcache.NewBigCache(bigcache.DefaultConfig(10 * time.Minute))
|
||||||
memory, err := bigcache.NewBigCache(bigcache.DefaultConfig(10 * time.Minute))
|
if err != nil {
|
||||||
if err != nil {
|
log.Panicln(err)
|
||||||
log.Panicln(err)
|
}
|
||||||
}
|
defer memory.Close()
|
||||||
defer memory.Close()
|
|
||||||
|
// Setup MinIO
|
||||||
// Setup MinIO
|
minioClient, err := minio.New(minioHost, &minio.Options{
|
||||||
minioClient, err := minio.New(minioHost, &minio.Options{
|
Creds: credentials.NewStaticV4(minioID, minioSecret, minioToken),
|
||||||
Creds: credentials.NewStaticV4(minioID, minioSecret, minioToken),
|
Region: minioRegion,
|
||||||
Region: minioRegion,
|
Secure: minioSecure == "true",
|
||||||
Secure: minioSecure == "true",
|
})
|
||||||
})
|
if err != nil {
|
||||||
if err != nil {
|
log.Fatalf("setting up minio client: %s", err.Error())
|
||||||
log.Fatalf("setting up minio client: %s", err.Error())
|
return
|
||||||
return
|
}
|
||||||
}
|
|
||||||
|
parsedRedisURL, err := redis.ParseURL(redisURL)
|
||||||
parsedRedisURL, err := redis.ParseURL(redisURL)
|
if err != nil {
|
||||||
if err != nil {
|
log.Fatalf("parsing redis url: %s", err.Error())
|
||||||
log.Fatalf("parsing redis url: %s", err.Error())
|
return
|
||||||
return
|
}
|
||||||
}
|
|
||||||
|
redisClient := redis.NewClient(parsedRedisURL)
|
||||||
redisClient := redis.NewClient(parsedRedisURL)
|
defer func() {
|
||||||
defer func() {
|
err := redisClient.Close()
|
||||||
err := redisClient.Close()
|
if err != nil {
|
||||||
if err != nil {
|
log.Printf("closing redis client: %s", err.Error())
|
||||||
log.Printf("closing redis client: %s", err.Error())
|
}
|
||||||
}
|
}()
|
||||||
}()
|
|
||||||
|
// Setup Sentry
|
||||||
// Setup Sentry
|
err = sentry.Init(sentry.ClientOptions{
|
||||||
err = sentry.Init(sentry.ClientOptions{
|
Dsn: sentryDsn,
|
||||||
Dsn: sentryDsn,
|
Environment: environment,
|
||||||
Environment: environment,
|
AttachStacktrace: true,
|
||||||
AttachStacktrace: true,
|
// Enable printing of SDK debug messages.
|
||||||
// Enable printing of SDK debug messages.
|
// Useful when getting started or trying to figure something out.
|
||||||
// Useful when getting started or trying to figure something out.
|
Debug: environment != "production",
|
||||||
Debug: environment != "production",
|
})
|
||||||
})
|
if err != nil {
|
||||||
if err != nil {
|
log.Fatalf("setting up sentry: %s", err.Error())
|
||||||
log.Fatalf("setting up sentry: %s", err.Error())
|
return
|
||||||
return
|
}
|
||||||
}
|
defer sentry.Flush(2 * time.Second)
|
||||||
defer sentry.Flush(2 * time.Second)
|
|
||||||
|
setupCtx, setupCancel := context.WithDeadline(context.Background(), time.Now().Add(time.Minute*4))
|
||||||
setupCtx, setupCancel := context.WithDeadline(context.Background(), time.Now().Add(time.Minute*4))
|
defer setupCancel()
|
||||||
defer setupCancel()
|
|
||||||
|
_, _, err = joke.GetTodaysJoke(setupCtx, minioClient, redisClient, memory)
|
||||||
_, _, err = joke.GetTodaysJoke(setupCtx, minioClient, redisClient, memory)
|
if err != nil {
|
||||||
if err != nil {
|
log.Fatalf("getting initial joke data: %s", err.Error())
|
||||||
log.Fatalf("getting initial joke data: %s", err.Error())
|
return
|
||||||
return
|
}
|
||||||
}
|
|
||||||
|
healthRouter := routes.Health(minioClient, redisClient)
|
||||||
healthRouter := routes.Health(minioClient, redisClient)
|
jokeRouter := routes.Joke(minioClient, redisClient, memory)
|
||||||
jokeRouter := routes.Joke(minioClient, redisClient, memory)
|
|
||||||
|
router := chi.NewRouter()
|
||||||
router := chi.NewRouter()
|
|
||||||
|
router.Use(cors.New(cors.Options{
|
||||||
router.Use(cors.New(cors.Options{
|
AllowedMethods: []string{http.MethodGet},
|
||||||
AllowedMethods: []string{http.MethodGet},
|
AllowCredentials: false,
|
||||||
AllowCredentials: false,
|
MaxAge: int(60 * 60 * 24 * 365),
|
||||||
MaxAge: int(60 * 60 * 24 * 365),
|
Debug: false,
|
||||||
Debug: false,
|
}).Handler)
|
||||||
}).Handler)
|
|
||||||
|
router.Mount("/health", healthRouter)
|
||||||
router.Mount("/health", healthRouter)
|
router.Mount("/", jokeRouter)
|
||||||
router.Mount("/", jokeRouter)
|
|
||||||
|
server := &http.Server{
|
||||||
server := &http.Server{
|
Handler: router,
|
||||||
Handler: router,
|
Addr: net.JoinHostPort(hostname, port),
|
||||||
Addr: net.JoinHostPort(hostname, port),
|
ReadTimeout: time.Minute,
|
||||||
ReadTimeout: time.Minute,
|
WriteTimeout: time.Minute,
|
||||||
WriteTimeout: time.Minute,
|
IdleTimeout: time.Second * 30,
|
||||||
IdleTimeout: time.Second * 30,
|
ReadHeaderTimeout: time.Minute,
|
||||||
ReadHeaderTimeout: time.Minute,
|
}
|
||||||
}
|
|
||||||
|
exitSignal := make(chan os.Signal, 1)
|
||||||
exitSignal := make(chan os.Signal, 1)
|
signal.Notify(exitSignal, os.Interrupt)
|
||||||
signal.Notify(exitSignal, os.Interrupt)
|
|
||||||
|
go func() {
|
||||||
go func() {
|
err := server.ListenAndServe()
|
||||||
err := server.ListenAndServe()
|
if err != nil && !errors.Is(err, http.ErrServerClosed) {
|
||||||
if err != nil && !errors.Is(err, http.ErrServerClosed) {
|
log.Fatalf("listening http server: %v", err)
|
||||||
log.Fatalf("listening http server: %v", err)
|
}
|
||||||
}
|
}()
|
||||||
}()
|
|
||||||
|
<-exitSignal
|
||||||
<-exitSignal
|
|
||||||
|
shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), time.Second*30)
|
||||||
shutdownCtx, shutdownCancel := context.WithTimeout(context.Background(), time.Second*30)
|
defer shutdownCancel()
|
||||||
defer shutdownCancel()
|
|
||||||
|
err = server.Shutdown(shutdownCtx)
|
||||||
err = server.Shutdown(shutdownCtx)
|
if err != nil {
|
||||||
if err != nil {
|
log.Printf("shutting down http server: %v", err)
|
||||||
log.Printf("shutting down http server: %v", err)
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
|
@ -1,144 +0,0 @@
|
||||||
package database
|
|
||||||
|
|
||||||
import (
|
|
||||||
"context"
|
|
||||||
|
|
||||||
"github.com/aldy505/bob"
|
|
||||||
"github.com/jackc/pgx/v4/pgxpool"
|
|
||||||
)
|
|
||||||
|
|
||||||
// Setup the table connection, create table if not exists
|
|
||||||
func Populate(db *pgxpool.Pool, ctx context.Context) error {
|
|
||||||
err := setupAuthTable(db, ctx)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
err = setupJokesTable(db, ctx)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
err = setupSubmissionTable(db, ctx)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func setupAuthTable(db *pgxpool.Pool, ctx context.Context) error {
|
|
||||||
conn, err := db.Acquire(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer conn.Release()
|
|
||||||
|
|
||||||
// Check if table exists
|
|
||||||
var tableAuthExists bool
|
|
||||||
err = conn.QueryRow(ctx, `SELECT EXISTS (
|
|
||||||
SELECT FROM information_schema.tables
|
|
||||||
WHERE table_schema = 'public'
|
|
||||||
AND table_name = 'administrators'
|
|
||||||
);`).Scan(&tableAuthExists)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if !tableAuthExists {
|
|
||||||
sql, _, err := bob.
|
|
||||||
CreateTable("administrators").
|
|
||||||
AddColumn(bob.ColumnDef{Name: "id", Type: "SERIAL", Extras: []string{"PRIMARY KEY"}}).
|
|
||||||
StringColumn("key", "NOT NULL", "UNIQUE").
|
|
||||||
TextColumn("token").
|
|
||||||
StringColumn("last_used").
|
|
||||||
ToSql()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = conn.Exec(ctx, sql)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func setupJokesTable(db *pgxpool.Pool, ctx context.Context) error {
|
|
||||||
conn, err := db.Acquire(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer conn.Release()
|
|
||||||
|
|
||||||
// Check if table exists
|
|
||||||
var tableJokesExists bool
|
|
||||||
err = conn.QueryRow(ctx, `SELECT EXISTS (
|
|
||||||
SELECT FROM information_schema.tables
|
|
||||||
WHERE table_schema = 'public'
|
|
||||||
AND table_name = 'jokesbapak2'
|
|
||||||
);`).Scan(&tableJokesExists)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if !tableJokesExists {
|
|
||||||
sql, _, err := bob.
|
|
||||||
CreateTable("jokesbapak2").
|
|
||||||
AddColumn(bob.ColumnDef{Name: "id", Type: "SERIAL", Extras: []string{"PRIMARY KEY"}}).
|
|
||||||
TextColumn("link", "UNIQUE").
|
|
||||||
AddColumn(bob.ColumnDef{Name: "creator", Type: "INT", Extras: []string{"NOT NULL", "REFERENCES \"administrators\" (\"id\")"}}).
|
|
||||||
ToSql()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = conn.Exec(ctx, sql)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
|
|
||||||
func setupSubmissionTable(db *pgxpool.Pool, ctx context.Context) error {
|
|
||||||
conn, err := db.Acquire(ctx)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
defer conn.Release()
|
|
||||||
|
|
||||||
//Check if table exists
|
|
||||||
var tableSubmissionExists bool
|
|
||||||
err = conn.QueryRow(ctx, `SELECT EXISTS (
|
|
||||||
SELECT FROM information_schema.tables
|
|
||||||
WHERE table_schema = 'public'
|
|
||||||
AND table_name = 'submission'
|
|
||||||
);`).Scan(&tableSubmissionExists)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
if !tableSubmissionExists {
|
|
||||||
sql, _, err := bob.
|
|
||||||
CreateTable("submission").
|
|
||||||
AddColumn(bob.ColumnDef{Name: "id", Type: "SERIAL", Extras: []string{"PRIMARY KEY"}}).
|
|
||||||
TextColumn("link", "UNIQUE", "NOT NULL").
|
|
||||||
StringColumn("created_at").
|
|
||||||
StringColumn("author", "NOT NULL").
|
|
||||||
AddColumn(bob.ColumnDef{Name: "status", Type: "SMALLINT", Extras: []string{"DEFAULT 0"}}).
|
|
||||||
ToSql()
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
|
|
||||||
_, err = conn.Exec(ctx, sql)
|
|
||||||
if err != nil {
|
|
||||||
return err
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return nil
|
|
||||||
}
|
|
|
@ -1,21 +0,0 @@
|
||||||
-- Access the data from your HTTP Request software (Postman or Insomnia)
|
|
||||||
-- with this auth:
|
|
||||||
-- key: test
|
|
||||||
-- token: password
|
|
||||||
|
|
||||||
INSERT INTO "administrators" ("id", "key", "token", "last_used") VALUES
|
|
||||||
(1, 'test', '$argon2id$v=19$m=65536,t=16,p=4$3a08c79fbf2222467a623df9a9ebf75802c65a4f9be36eb1df2f5d2052d53cb7$ce434bd38f7ba1fc1f2eb773afb8a1f7f2dad49140803ac6cb9d7256ce9826fb3b4afa1e2488da511c852fc6c33a76d5657eba6298a8e49d617b9972645b7106', '');
|
|
||||||
|
|
||||||
-- 10 jokes is enough right?
|
|
||||||
|
|
||||||
INSERT INTO "jokesbapak2" ("link", "creator") VALUES
|
|
||||||
('https://picsum.photos/id/1000/500/500', 1),
|
|
||||||
('https://picsum.photos/id/1001/500/500', 1),
|
|
||||||
('https://picsum.photos/id/1002/500/500', 1),
|
|
||||||
('https://picsum.photos/id/1003/500/500', 1),
|
|
||||||
('https://picsum.photos/id/1004/500/500', 1),
|
|
||||||
('https://picsum.photos/id/1005/500/500', 1),
|
|
||||||
('https://picsum.photos/id/1006/500/500', 1),
|
|
||||||
('https://picsum.photos/id/1010/500/500', 1),
|
|
||||||
('https://picsum.photos/id/1008/500/500', 1),
|
|
||||||
('https://picsum.photos/id/1009/500/500', 1);
|
|
|
@ -1,8 +1,9 @@
|
||||||
package utils_test
|
package utils_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"jokes-bapak2-api/utils"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"jokes-bapak2-api/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIsIn_True(t *testing.T) {
|
func TestIsIn_True(t *testing.T) {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package utils_test
|
package utils_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"jokes-bapak2-api/utils"
|
|
||||||
"testing"
|
"testing"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
|
"jokes-bapak2-api/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestIsToday_Today(t *testing.T) {
|
func TestIsToday_Today(t *testing.T) {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package utils_test
|
package utils_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"jokes-bapak2-api/utils"
|
|
||||||
"strings"
|
"strings"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"jokes-bapak2-api/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestParseToJSONBody(t *testing.T) {
|
func TestParseToJSONBody(t *testing.T) {
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package utils_test
|
package utils_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"jokes-bapak2-api/utils"
|
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"jokes-bapak2-api/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRandomString_Valid(t *testing.T) {
|
func TestRandomString_Valid(t *testing.T) {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package utils_test
|
package utils_test
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"jokes-bapak2-api/utils"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"testing"
|
"testing"
|
||||||
|
|
||||||
|
"jokes-bapak2-api/utils"
|
||||||
)
|
)
|
||||||
|
|
||||||
func TestRequest_Get(t *testing.T) {
|
func TestRequest_Get(t *testing.T) {
|
||||||
|
|
|
@ -14,6 +14,6 @@ $ yarn start
|
||||||
|
|
||||||
## Used package
|
## Used package
|
||||||
|
|
||||||
| Name | Version | Type |
|
| Name | Version | Type |
|
||||||
| --- | --- | --- |
|
|---------------------------------------------------------------|----------|-------------------|
|
||||||
| [mcollina/autocannon](https://github.com/mcollina/autocannon) | `v7.4.0` | Benchmarking Tool |
|
| [mcollina/autocannon](https://github.com/mcollina/autocannon) | `v7.4.0` | Benchmarking Tool |
|
|
@ -1,4 +1,4 @@
|
||||||
VITE_NODE_ENV=development
|
NODE_ENV=development
|
||||||
VITE_SERVER_API_ENDPOINT=
|
SERVER_API_ENDPOINT=
|
||||||
VITE_BROWSER_API_ENDPOINT=
|
BROWSER_API_ENDPOINT=
|
||||||
VITE_SENTRY_DSN=
|
SENTRY_DSN=
|
|
@ -1,20 +1,35 @@
|
||||||
module.exports = {
|
module.exports = {
|
||||||
root: true,
|
root: true,
|
||||||
parser: '@typescript-eslint/parser',
|
parser: '@typescript-eslint/parser',
|
||||||
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'],
|
extends: ['eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier', "plugin:astro/recommended",],
|
||||||
plugins: ['svelte3', '@typescript-eslint'],
|
plugins: ['@typescript-eslint'],
|
||||||
ignorePatterns: ['*.cjs'],
|
ignorePatterns: ['*.cjs'],
|
||||||
overrides: [{ files: ['*.svelte'], processor: 'svelte3/svelte3' }],
|
overrides: [
|
||||||
settings: {
|
{
|
||||||
'svelte3/typescript': () => require('typescript')
|
// Define the configuration for `.astro` file.
|
||||||
},
|
files: ["*.astro"],
|
||||||
parserOptions: {
|
// Allows Astro components to be parsed.
|
||||||
sourceType: 'module',
|
parser: "astro-eslint-parser",
|
||||||
ecmaVersion: 2019
|
// Parse the script in `.astro` as TypeScript by adding the following configuration.
|
||||||
},
|
// It's the setting you need when using TypeScript.
|
||||||
env: {
|
parserOptions: {
|
||||||
browser: true,
|
parser: "@typescript-eslint/parser",
|
||||||
es2017: true,
|
extraFileExtensions: [".astro"],
|
||||||
node: true
|
},
|
||||||
}
|
rules: {
|
||||||
|
// override/add rules settings here, such as:
|
||||||
|
// "astro/no-set-html-directive": "error"
|
||||||
|
},
|
||||||
|
},
|
||||||
|
],
|
||||||
|
parserOptions: {
|
||||||
|
sourceType: 'module',
|
||||||
|
ecmaVersion: 2019,
|
||||||
|
extraFileExtensions: [".svelte"]
|
||||||
|
},
|
||||||
|
env: {
|
||||||
|
browser: true,
|
||||||
|
es2017: true,
|
||||||
|
node: true
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
v16.13
|
v20
|
|
@ -1,10 +1,10 @@
|
||||||
{
|
{
|
||||||
"useTabs": false,
|
"useTabs": false,
|
||||||
"endOfLine": "lf",
|
"endOfLine": "lf",
|
||||||
"arrowParens": "always",
|
"arrowParens": "always",
|
||||||
"semi": true,
|
"semi": true,
|
||||||
"tabWidth": 2,
|
"tabWidth": 2,
|
||||||
"singleQuote": true,
|
"singleQuote": true,
|
||||||
"trailingComma": "es5",
|
"trailingComma": "es5",
|
||||||
"printWidth": 120
|
"printWidth": 120
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,10 @@
|
||||||
FROM node:16.17.0-bullseye
|
FROM node:18.17.1-bookworm
|
||||||
|
|
||||||
RUN apt-get update && apt-get upgrade --no-install-recommends -y \
|
RUN apt-get update && \
|
||||||
&& apt-get install -y --no-install-recommends curl \
|
apt-get upgrade --no-install-recommends -y && \
|
||||||
&& apt-get clean && rm -rf /var/lib/apt/lists/*
|
apt-get install -y --no-install-recommends curl && \
|
||||||
|
apt-get clean && \
|
||||||
|
rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
||||||
|
@ -13,7 +15,10 @@ ENV VITE_SERVER_API_ENDPOINT="http://api:5000"
|
||||||
ENV VITE_BROWSER_API_ENDPOINT="https://jokesbapak2.reinaldyrafli.com/api"
|
ENV VITE_BROWSER_API_ENDPOINT="https://jokesbapak2.reinaldyrafli.com/api"
|
||||||
ENV VITE_SENTRY_DSN=""
|
ENV VITE_SENTRY_DSN=""
|
||||||
|
|
||||||
RUN npm ci && npm run build && rm -rf node_modules && npm ci --omit=dev
|
RUN npm ci && \
|
||||||
|
npm run build && \
|
||||||
|
rm -rf node_modules && \
|
||||||
|
npm ci --omit=dev
|
||||||
|
|
||||||
EXPOSE ${PORT}
|
EXPOSE ${PORT}
|
||||||
|
|
||||||
|
|
|
@ -15,12 +15,13 @@ $ npm run dev
|
||||||
$ npm run build
|
$ npm run build
|
||||||
```
|
```
|
||||||
|
|
||||||
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should _not_ be used to serve your app in production.
|
> You can preview the built app with `npm run preview`, regardless of whether you installed an adapter. This should
|
||||||
|
_not_ be used to serve your app in production.
|
||||||
|
|
||||||
## Used packages
|
## Used packages
|
||||||
|
|
||||||
| Name | Version | Type |
|
| Name | Version | Type |
|
||||||
| -------------------------- | ---------------- | -------------------- |
|
|----------------------------|------------------|----------------------|
|
||||||
| @sveltejs/kit | `1.0.0-next.480` | Framework |
|
| @sveltejs/kit | `1.0.0-next.480` | Framework |
|
||||||
| svelte | `3.50.1` | Framework |
|
| svelte | `3.50.1` | Framework |
|
||||||
| typescript | `4.8.3` | Static type language |
|
| typescript | `4.8.3` | Static type language |
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
import { defineConfig } from 'astro/config';
|
||||||
|
import UnoCSS from '@unocss/astro'
|
||||||
|
|
||||||
|
// https://astro.build/config
|
||||||
|
export default defineConfig({
|
||||||
|
i18n: {
|
||||||
|
defaultLocale: "en",
|
||||||
|
locales: ["en", "id"]
|
||||||
|
},
|
||||||
|
integrations: [
|
||||||
|
UnoCSS({
|
||||||
|
injectReset: true
|
||||||
|
}),
|
||||||
|
],
|
||||||
|
});
|
File diff suppressed because it is too large
Load Diff
|
@ -5,45 +5,38 @@
|
||||||
"contributors": [
|
"contributors": [
|
||||||
{
|
{
|
||||||
"name": "Reinaldy Rafli",
|
"name": "Reinaldy Rafli",
|
||||||
"email": "aldy505@tutanota.com",
|
"email": "aldy505@proton.me",
|
||||||
"url": "https://github.com/aldy505"
|
"url": "https://github.com/aldy505"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"type": "module",
|
"type": "module",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite dev",
|
"dev": "astro dev",
|
||||||
"build": "vite build",
|
"start": "astro dev",
|
||||||
"preview": "vite preview",
|
"build": "astro check && astro build",
|
||||||
"check": "svelte-check --tsconfig ./tsconfig.json",
|
"preview": "astro preview",
|
||||||
"check:watch": "svelte-check --tsconfig ./tsconfig.json --watch",
|
"astro": "astro",
|
||||||
"lint": "eslint --fix --ext .svelte,.js,.ts --ignore-path .gitignore .",
|
"lint": "eslint --fix --ext .astro,.js,.ts --ignore-path .gitignore .",
|
||||||
"format": "prettier --write --ignore-path .gitignore --plugin-search-dir=. \"./**/*.(ts|json|js|svelte)\""
|
"format": "prettier --write --ignore-path .gitignore --plugin-search-dir=. \"./**/*.(ts|json|js|astro)\""
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@sveltejs/adapter-node": "^1.0.0-next.89",
|
"@typescript-eslint/eslint-plugin": "6.3.0",
|
||||||
"@sveltejs/kit": "1.0.0-next.480",
|
"@typescript-eslint/parser": "6.3.0",
|
||||||
"@typescript-eslint/eslint-plugin": "5.36.2",
|
"cssnano": "6.0.1",
|
||||||
"@typescript-eslint/parser": "5.36.2",
|
"eslint": "8.47.0",
|
||||||
"cssnano": "5.1.13",
|
"eslint-config-prettier": "9.0.0",
|
||||||
"eslint": "8.23.0",
|
"eslint-plugin-astro": "^0.31.4",
|
||||||
"eslint-config-prettier": "8.5.0",
|
"prettier": "3.0.1",
|
||||||
"eslint-plugin-svelte3": "4.0.0",
|
"typescript": "5.3.3"
|
||||||
"prettier": "2.7.1",
|
|
||||||
"prettier-plugin-svelte": "2.7.0",
|
|
||||||
"svelte": "3.50.1",
|
|
||||||
"svelte-check": "2.9.0",
|
|
||||||
"svelte-preprocess": "4.10.7",
|
|
||||||
"svelte-windicss-preprocess": "4.2.8",
|
|
||||||
"tslib": "2.4.0",
|
|
||||||
"typescript": "4.8.3",
|
|
||||||
"vite": "^3.1.0"
|
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@fontsource/fira-mono": "4.5.9",
|
"@astrojs/check": "^0.5.2",
|
||||||
"@fontsource/rubik": "4.5.11",
|
"@fontsource/fira-mono": "5.0.8",
|
||||||
"@sentry/browser": "7.12.1",
|
"@fontsource/rubik": "5.0.8",
|
||||||
"dotenv": "16.0.2",
|
"@sentry/astro": "^7.100.1",
|
||||||
"ohmyfetch": "0.4.18",
|
"@unocss/astro": "^0.58.5",
|
||||||
"svelte-i18n": "3.4.0"
|
"@unocss/reset": "^0.58.5",
|
||||||
|
"astro": "^4.3.5",
|
||||||
|
"unocss": "^0.58.5"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Before Width: | Height: | Size: 9.7 KiB After Width: | Height: | Size: 9.7 KiB |
File diff suppressed because it is too large
Load Diff
Before Width: | Height: | Size: 304 KiB After Width: | Height: | Size: 302 KiB |
Before Width: | Height: | Size: 74 KiB After Width: | Height: | Size: 74 KiB |
|
@ -1,29 +1,29 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="%lang%">
|
<html lang="%lang%">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8"/>
|
||||||
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
|
<link href="%sveltekit.assets%/favicon.png" rel="icon"/>
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1" />
|
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
||||||
<meta name="keywords" content="jokesbapak2, jokes, bapak2, indonesian, dad, jokes, api, rest" />
|
<meta content="jokesbapak2, jokes, bapak2, indonesian, dad, jokes, api, rest" name="keywords"/>
|
||||||
<meta name="author" content="Reinaldy Rafli" />
|
<meta content="Reinaldy Rafli" name="author"/>
|
||||||
<meta name="theme-color" content="#f4a9f5" />
|
<meta content="#f4a9f5" name="theme-color"/>
|
||||||
<meta name="publisher" content="https://jokesbapak2.reinaldyrafli.com/" />
|
<meta content="https://jokesbapak2.reinaldyrafli.com/" name="publisher"/>
|
||||||
<meta property="og:image" content="%sveltekit.assets%/social.jpg" />
|
<meta content="%sveltekit.assets%/social.jpg" property="og:image"/>
|
||||||
<meta property="og:image:alt" content="Jokesbapak2 - Largest collection of Indonesian dad jokes" />
|
<meta content="Jokesbapak2 - Largest collection of Indonesian dad jokes" property="og:image:alt"/>
|
||||||
<meta property="og:image:secure_url" content="%sveltekit.assets%/social.jpg" />
|
<meta content="%sveltekit.assets%/social.jpg" property="og:image:secure_url"/>
|
||||||
<meta property="og:image:width" content="1280" />
|
<meta content="1280" property="og:image:width"/>
|
||||||
<meta property="og:image:height" content="640" />
|
<meta content="640" property="og:image:height"/>
|
||||||
<meta property="og:locale" content="en_US" />
|
<meta content="en_US" property="og:locale"/>
|
||||||
<meta property="og:type" content="website" />
|
<meta content="website" property="og:type"/>
|
||||||
<meta name="twitter:card" content="summary_large_image" />
|
<meta content="summary_large_image" name="twitter:card"/>
|
||||||
<meta name="twitter:image:src" content="%sveltekit.assets%/social.jpg" />
|
<meta content="%sveltekit.assets%/social.jpg" name="twitter:image:src"/>
|
||||||
<meta name="twitter:image" content="%sveltekit.assets%/social.jpg" />
|
<meta content="%sveltekit.assets%/social.jpg" name="twitter:image"/>
|
||||||
<meta name="twitter:creator" content="Reinaldy Rafli" />
|
<meta content="Reinaldy Rafli" name="twitter:creator"/>
|
||||||
<link rel="icon" type="image/png" href="/favicon.png">
|
<link href="/favicon.png" rel="icon" type="image/png">
|
||||||
<link rel="icon" type="image/svg" href="/favicon.svg">
|
<link href="/favicon.svg" rel="icon" type="image/svg">
|
||||||
%sveltekit.head%
|
%sveltekit.head%
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<div id="svelte">%sveltekit.body%</div>
|
<div id="svelte">%sveltekit.body%</div>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -1,61 +1,67 @@
|
||||||
<script lang="ts">
|
---
|
||||||
import { goto } from '$app/navigation';
|
import { getAbsoluteLocaleUrl } from "astro:i18n";
|
||||||
import { _ } from 'svelte-i18n';
|
import * as indonesianTranslation from "../languages/id.json";
|
||||||
|
import * as englishTranslation from "../languages/en.json";
|
||||||
|
let open = false;
|
||||||
|
let duration = 0.4;
|
||||||
|
let burgerColor = 'rgb(18.4, 18.4, 18.4)';
|
||||||
|
let menuColor = 'rgb(180, 180, 180)';
|
||||||
|
|
||||||
let open = false;
|
|
||||||
let duration = 0.4;
|
---
|
||||||
let burgerColor = 'rgb(18.4, 18.4, 18.4)';
|
<script>
|
||||||
let menuColor = 'rgb(180, 180, 180)';
|
export function goto(path: string) {
|
||||||
|
getAbsoluteLocaleUrl()
|
||||||
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<nav class="flex flex-row py-6 font-body items-center">
|
<nav class="flex flex-row py-6 font-body items-center">
|
||||||
<div on:click={() => goto('/')} class="hover:cursor-pointer flex-5 font-bold text-2xl">Jokesbapak2</div>
|
<div class="hover:cursor-pointer flex-5 font-bold text-2xl" on:click={() => goto('/')}>Jokesbapak2</div>
|
||||||
<div on:click={() => goto('/why')} class="navigation-item">{$_('navigation.why')}</div>
|
<div class="navigation-item" on:click={() => goto('/why')}>{$_('navigation.why')}</div>
|
||||||
<div on:click={() => goto('/guide')} class="navigation-item">{$_('navigation.guide')}</div>
|
<div class="navigation-item" on:click={() => goto('/guide')}>{$_('navigation.guide')}</div>
|
||||||
<div on:click={() => goto('/api')} class="navigation-item">{$_('navigation.api')}</div>
|
<div class="navigation-item" on:click={() => goto('/api')}>{$_('navigation.api')}</div>
|
||||||
<div
|
<div
|
||||||
class="flex-1 md:hidden transition-all duration-400 ease-in-out"
|
class="flex-1 md:hidden transition-all duration-400 ease-in-out"
|
||||||
class:open
|
class:open
|
||||||
on:click={() => (open = !open)}
|
on:click={() => (open = !open)}
|
||||||
style="color: {open ? menuColor : burgerColor};"
|
style="color: {open ? menuColor : burgerColor};"
|
||||||
>
|
>
|
||||||
<svg width="32" height="32" class="dark:text-white text-black">
|
<svg class="dark:text-white text-black" height="32" width="32">
|
||||||
<line
|
<line
|
||||||
id="top"
|
id="top"
|
||||||
x1="0"
|
|
||||||
y1="9"
|
|
||||||
x2="32"
|
|
||||||
y2="9"
|
|
||||||
style="transition: transform {duration}s ease-in-out, opacity {duration}s ease-in-out;"
|
style="transition: transform {duration}s ease-in-out, opacity {duration}s ease-in-out;"
|
||||||
|
x1="0"
|
||||||
|
x2="32"
|
||||||
|
y1="9"
|
||||||
|
y2="9"
|
||||||
/>
|
/>
|
||||||
<line
|
<line
|
||||||
id="mid"
|
id="mid"
|
||||||
x1="0"
|
|
||||||
y1="18.5"
|
|
||||||
x2="32"
|
|
||||||
y2="18.5"
|
|
||||||
style="transition: transform {duration}s ease-in-out, opacity {duration}s ease-in-out;"
|
style="transition: transform {duration}s ease-in-out, opacity {duration}s ease-in-out;"
|
||||||
|
x1="0"
|
||||||
|
x2="32"
|
||||||
|
y1="18.5"
|
||||||
|
y2="18.5"
|
||||||
/>
|
/>
|
||||||
<line
|
<line
|
||||||
id="bot"
|
id="bot"
|
||||||
x1="0"
|
|
||||||
y1="28"
|
|
||||||
x2="32"
|
|
||||||
y2="28"
|
|
||||||
style="transition: transform {duration}s ease-in-out, opacity {duration}s ease-in-out;"
|
style="transition: transform {duration}s ease-in-out, opacity {duration}s ease-in-out;"
|
||||||
|
x1="0"
|
||||||
|
x2="32"
|
||||||
|
y1="28"
|
||||||
|
y2="28"
|
||||||
/>
|
/>
|
||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
</nav>
|
</nav>
|
||||||
|
|
||||||
{#if open}
|
{open &&
|
||||||
<menu
|
<menu
|
||||||
class="top-of-the-world dark:bg-gray-900 dark:text-white bg-lavender-200 bg-gradient-to-br to-lavender-400 dark:to-lavender-900 text-black w-full h-full overscroll-none"
|
class="top-of-the-world dark:bg-gray-900 dark:text-white bg-lavender-200 bg-gradient-to-br to-lavender-400 dark:to-lavender-900 text-black w-full h-full overscroll-none"
|
||||||
>
|
>
|
||||||
<div class="container -pr-10">
|
<div class="container -pr-10">
|
||||||
<div class="flex flex-col items-center content-center text-center pt-20">
|
<div class="flex flex-col items-center content-center text-center pt-20">
|
||||||
<div
|
<div
|
||||||
on:click={() => {
|
onclick={() => {
|
||||||
open = false;
|
open = false;
|
||||||
return goto('/');
|
return goto('/');
|
||||||
}}
|
}}
|
||||||
|
@ -93,30 +99,36 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</menu>
|
</menu>
|
||||||
{/if}
|
}
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.navigation-item {
|
.navigation-item {
|
||||||
@apply hidden 'md:block' text-center 'md:flex-1' duration-300 transition ease-in-out py-2 'md:py-0' 'md:opacity-50' 'hover:cursor-pointer' 'hover:scale-110' 'hover:opacity-100';
|
@apply hidden 'md:block' text-center 'md:flex-1' duration-300 transition ease-in-out py-2 'md:py-0' 'md:opacity-50' 'hover:cursor-pointer' 'hover:scale-110' 'hover:opacity-100';
|
||||||
}
|
}
|
||||||
|
|
||||||
.top-of-the-world {
|
.top-of-the-world {
|
||||||
@apply fixed z-20 -top-4 left-0 right-0 bottom-0;
|
@apply fixed z-20 -top-4 left-0 right-0 bottom-0;
|
||||||
}
|
}
|
||||||
|
|
||||||
svg line {
|
svg line {
|
||||||
stroke: currentColor;
|
stroke: currentColor;
|
||||||
stroke-width: 3;
|
stroke-width: 3;
|
||||||
}
|
}
|
||||||
|
|
||||||
.open {
|
.open {
|
||||||
@apply z-30 fixed right-12;
|
@apply z-30 fixed right-12;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* rotate the top line */
|
/* rotate the top line */
|
||||||
.open #top {
|
.open #top {
|
||||||
transform: translate(10px, 0px) rotate(45deg);
|
transform: translate(10px, 0px) rotate(45deg);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* hide the middle */
|
/* hide the middle */
|
||||||
.open #mid {
|
.open #mid {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* rotate the bottom line */
|
/* rotate the bottom line */
|
||||||
.open #bot {
|
.open #bot {
|
||||||
transform: translate(-15px, 8px) rotate(-45deg);
|
transform: translate(-15px, 8px) rotate(-45deg);
|
|
@ -1,12 +1,14 @@
|
||||||
<script lang="ts">
|
---
|
||||||
export let emoji = '';
|
let emoji = '';
|
||||||
</script>
|
---
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="bg-chetwode-200 dark:bg-chetwode-800 font-body px-4 md:px-8 py-6 md:my-8 rounded-lg text-black dark:text-white shadow-xl bg-gradient-to-br from-transparent to-chetwode-300 dark:to-chetwode-900"
|
class="bg-chetwode-200 dark:bg-chetwode-800 font-body px-4 md:px-8 py-6 md:my-8 rounded-lg text-black dark:text-white shadow-xl bg-gradient-to-br from-transparent to-chetwode-300 dark:to-chetwode-900"
|
||||||
>
|
>
|
||||||
<div class="flex flex-row items-center content-center">
|
<div class="flex flex-row items-center content-center">
|
||||||
<div class="flex-initial px-4 text-center text-lg">{emoji}</div>
|
<div class="flex-initial px-4 text-center text-lg">{emoji}</div>
|
||||||
<div class="flex-auto"><slot /></div>
|
<div class="flex-auto">
|
||||||
|
<slot />
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
|
@ -0,0 +1 @@
|
||||||
|
/// <reference types="astro/client" />
|
|
@ -1 +0,0 @@
|
||||||
/// <reference types="@sveltejs/kit" />
|
|
|
@ -1,7 +0,0 @@
|
||||||
import type { Handle } from '@sveltejs/kit';
|
|
||||||
|
|
||||||
export const handle: Handle = ({ event, resolve }) => {
|
|
||||||
return resolve(event, {
|
|
||||||
transformPageChunk: ({ html }) => html.replace('%lang%', 'en'),
|
|
||||||
});
|
|
||||||
};
|
|
|
@ -0,0 +1,100 @@
|
||||||
|
---
|
||||||
|
import '@fontsource/fira-mono';
|
||||||
|
import '@fontsource/rubik';
|
||||||
|
import Navbar from '../components/Navbar.astro';
|
||||||
|
const { lang } = Astro.props;
|
||||||
|
const currentPath = Astro.url.path.replace("/en/", "/").replace("/id/", "/");
|
||||||
|
|
||||||
|
const translations = {
|
||||||
|
id: {
|
||||||
|
footer: {
|
||||||
|
"made": "Diciptakan dengan",
|
||||||
|
"indonesia": "di Indonesia",
|
||||||
|
"available": "Proyek ini tersedia di",
|
||||||
|
"github": "Github",
|
||||||
|
"language": "Bahasa:",
|
||||||
|
"english": "Inggris",
|
||||||
|
"indonesian": "Indonesia"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
en: {
|
||||||
|
footer: {
|
||||||
|
"made": "Made with",
|
||||||
|
"indonesia": "in Indonesia",
|
||||||
|
"available": "This project is available on",
|
||||||
|
"github": "Github",
|
||||||
|
"language": "Languages:",
|
||||||
|
"english": "English",
|
||||||
|
"indonesian": "Indonesian"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang={lang}>
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8"/>
|
||||||
|
<link href="/favicon.png" rel="icon"/>
|
||||||
|
<meta content="width=device-width, initial-scale=1" name="viewport"/>
|
||||||
|
<meta content="jokesbapak2, jokes, bapak2, indonesian, dad, jokes, api, rest" name="keywords"/>
|
||||||
|
<meta content="Reinaldy Rafli" name="author"/>
|
||||||
|
<meta content="#f4a9f5" name="theme-color"/>
|
||||||
|
<meta content="https://jokesbapak2.reinaldyrafli.com/" name="publisher"/>
|
||||||
|
<meta content="/social.jpg" property="og:image"/>
|
||||||
|
<meta content="Jokesbapak2 - Largest collection of Indonesian dad jokes" property="og:image:alt"/>
|
||||||
|
<meta content="/social.jpg" property="og:image:secure_url"/>
|
||||||
|
<meta content="1280" property="og:image:width"/>
|
||||||
|
<meta content="640" property="og:image:height"/>
|
||||||
|
<meta content="en_US" property="og:locale"/>
|
||||||
|
<meta content="website" property="og:type"/>
|
||||||
|
<meta content="summary_large_image" name="twitter:card"/>
|
||||||
|
<meta content="/social.jpg" name="twitter:image:src"/>
|
||||||
|
<meta content="/social.jpg" name="twitter:image"/>
|
||||||
|
<meta content="Reinaldy Rafli" name="twitter:creator"/>
|
||||||
|
<link href="/favicon.png" rel="icon" type="image/png">
|
||||||
|
<link href="/favicon.svg" rel="icon" type="image/svg">
|
||||||
|
%sveltekit.head%
|
||||||
|
</head>
|
||||||
|
<body>
|
||||||
|
<div
|
||||||
|
class="bg-gradient-to-br from-transparent to-lavender-300 dark:(bg-gray-900 to-lavender-900 text-white) min-h-screen h-full w-full"
|
||||||
|
>
|
||||||
|
<div class="container mx-auto xl:px-40 lg:px-28 md:px-20 sm:px-12 px-8 w-full">
|
||||||
|
<header>
|
||||||
|
<Navbar />
|
||||||
|
</header>
|
||||||
|
<main class="font-body">
|
||||||
|
<slot />
|
||||||
|
</main>
|
||||||
|
|
||||||
|
<footer class="font-body py-8 w-full md:w-1/2 lg:w-2/5">
|
||||||
|
<div class="flex flex-col md:flex-row flex-wrap">
|
||||||
|
<div class="flex-initial pr-3">
|
||||||
|
<p class="text-sm opacity-50 hover:opacity-90 transition duration-300 ease-in-out inline-block">
|
||||||
|
{translations[lang].footer.made} <span class="text-red-500">❤</span>
|
||||||
|
{translations[lang].footer.indonesia}.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex-initial pr-3">
|
||||||
|
<p class="text-sm opacity-50 hover:opacity-90 transition duration-300 ease-in-out inline-block">
|
||||||
|
{translations[lang].footer.available}
|
||||||
|
<a class="hover:underline" href="https://www.github.com/aldy505/jokes-bapak2">{translations[lang].footer.github}</a>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex-initial pr-3">
|
||||||
|
<p class="text-sm opacity-50 hover:opacity-90 transition duration-300 ease-in-out inline-block">
|
||||||
|
{translations[lang].footer.language}
|
||||||
|
<a class="hover:underline" href={`/en/${currentPath}`} target="_top">{translations[lang].footer.english}</a>
|
||||||
|
|
|
||||||
|
<a class="hover:underline" href={`/id/${currentPath}`} target="_top">{translations[lang].footer.indonesian}</a>.
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -1,6 +0,0 @@
|
||||||
export default {
|
|
||||||
SERVER_API_ENDPOINT: import.meta.env.VITE_SERVER_API_ENDPOINT || 'http://localhost:5000',
|
|
||||||
BROWSER_API_ENDPOINT: import.meta.env.VITE_BROWSER_API_ENDPOINT || 'https://jokesbapak2.reinaldyrafli.com',
|
|
||||||
SENTRY_DSN: import.meta.env.VITE_SENTRY_DSN || '',
|
|
||||||
NODE_ENV: import.meta.env.VITE_NODE_ENV || 'development',
|
|
||||||
};
|
|
|
@ -1,15 +0,0 @@
|
||||||
import { init, getLocaleFromNavigator, addMessages, getLocaleFromQueryString } from 'svelte-i18n';
|
|
||||||
|
|
||||||
import en from '../languages/en.json';
|
|
||||||
import id from '../languages/id.json';
|
|
||||||
|
|
||||||
addMessages('en', en);
|
|
||||||
addMessages('en-US', en);
|
|
||||||
addMessages('en-GB', en);
|
|
||||||
addMessages('id', id);
|
|
||||||
addMessages('id-ID', id);
|
|
||||||
|
|
||||||
init({
|
|
||||||
fallbackLocale: 'en',
|
|
||||||
initialLocale: getLocaleFromQueryString('lang') || getLocaleFromNavigator(),
|
|
||||||
});
|
|
|
@ -1,10 +0,0 @@
|
||||||
import * as Sentry from '@sentry/browser';
|
|
||||||
import env from './env';
|
|
||||||
|
|
||||||
Sentry.init({
|
|
||||||
dsn: String(env.SENTRY_DSN) || '',
|
|
||||||
enabled: String(env.NODE_ENV) === 'production',
|
|
||||||
tracesSampleRate: 0.5,
|
|
||||||
});
|
|
||||||
|
|
||||||
export default Sentry;
|
|
|
@ -0,0 +1,77 @@
|
||||||
|
---
|
||||||
|
// This page is meant to explain available API endpoints.
|
||||||
|
import Codeblock from '../../components/Codeblock.astro';
|
||||||
|
import Notice from '../../components/Notice.astro';
|
||||||
|
import Layout from '../../layout/Layout.astro';
|
||||||
|
|
||||||
|
const totalJokes = async (): Promise<string> => {
|
||||||
|
const response = await fetch(`${import.meta.env.API_ENDPOINT}/total`);
|
||||||
|
const responseBody = await response.json();
|
||||||
|
return responseBody.message;
|
||||||
|
};
|
||||||
|
|
||||||
|
let total = await totalJokes();
|
||||||
|
---
|
||||||
|
<!-- <svelte:head>
|
||||||
|
<title>{$_('navigation.api')} - {$_('meta.title')}</title>
|
||||||
|
<meta content={$_('navigation.api') + '-' + $_('meta.title')} name="title" />
|
||||||
|
<meta content={$_('navigation.api') + '-' + $_('meta.title')} name="twitter:title" />
|
||||||
|
<meta content={$_('navigation.api') + '-' + $_('meta.title')} property="og:title" />
|
||||||
|
<link href="https://jokesbapak2.reinaldyrafli.com/api" rel="canonical" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="twitter:description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" property="og:description" />
|
||||||
|
</svelte:head> -->
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<section>
|
||||||
|
<Notice emoji="💡">
|
||||||
|
We limit the request to be 120 request/minute.
|
||||||
|
</Notice>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="api_page">
|
||||||
|
<h1>Get Jokes</h1>
|
||||||
|
<h2>Get single random joke</h2>
|
||||||
|
<p>You'll get different result for every call.</p>
|
||||||
|
<Codeblock>
|
||||||
|
GET {import.meta.env.BROWSER_API_ENDPOINT}/
|
||||||
|
</Codeblock>
|
||||||
|
<h2>Get today's joke</h2>
|
||||||
|
<p>A joke a day makes more of a dad out of you.</p>
|
||||||
|
<Codeblock>
|
||||||
|
GET {import.meta.env.BROWSER_API_ENDPOINT}/today
|
||||||
|
</Codeblock>
|
||||||
|
<h2>Get joke by ID</h2>
|
||||||
|
<p>You'll get consistent joke for every call with the same ID. Where ID is a number ranging from 1 to {total}.</p>
|
||||||
|
<Codeblock>
|
||||||
|
GET {import.meta.env.BROWSER_API_ENDPOINT}/id/{id}
|
||||||
|
</Codeblock>
|
||||||
|
<h2>Get total number of jokes</h2>
|
||||||
|
<p>...in a form of JSON response.</p>
|
||||||
|
<Codeblock>
|
||||||
|
GET {import.meta.env.BROWSER_API_ENDPOINT}/total
|
||||||
|
</Codeblock>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
h1 {
|
||||||
|
@apply text-4xl;
|
||||||
|
@apply font-bold;
|
||||||
|
@apply py-4;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
@apply text-2xl;
|
||||||
|
@apply font-bold;
|
||||||
|
@apply pt-6;
|
||||||
|
@apply pb-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
@apply text-base;
|
||||||
|
@apply opacity-80;
|
||||||
|
@apply py-2;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</Layout>
|
|
@ -0,0 +1,80 @@
|
||||||
|
---
|
||||||
|
import Codeblock from '../../components/Codeblock.astro';
|
||||||
|
import Layout from '../../layout/Layout.astro';
|
||||||
|
// This page is meant to guide people on how to use the API.
|
||||||
|
const browserAPIEndpoint = import.meta.env.BROWSER_API_ENDPOINT;
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- <svelte:head>
|
||||||
|
<title>{$_('navigation.guide')} - {$_('meta.title')}</title>
|
||||||
|
<meta content={$_('navigation.guide') + '-' + $_('meta.title')} name="title" />
|
||||||
|
<meta content={$_('navigation.guide') + '-' + $_('meta.title')} name="twitter:title" />
|
||||||
|
<meta content={$_('navigation.guide') + '-' + $_('meta.title')} property="og:title" />
|
||||||
|
<link href="https://jokesbapak2.reinaldyrafli.com/guide" rel="canonical" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="twitter:description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" property="og:description" />
|
||||||
|
</svelte:head> -->
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<section class="guide_page">
|
||||||
|
<h1>Guide</h1>
|
||||||
|
<p>
|
||||||
|
To access the API, there are a few ways to do it.
|
||||||
|
It depends on what you are trying to accomplish with it.
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="guide_page">
|
||||||
|
<h2>Direct request with <code><img></code> block</h2>
|
||||||
|
<Codeblock><img src="{browserAPIEndpoint}/" /></Codeblock>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="guide_page">
|
||||||
|
<h2>Using fetch API</h2>
|
||||||
|
<p>You can use it, but I personally don't recommend it.</p>
|
||||||
|
<Codeblock>
|
||||||
|
const response = await fetch("{browserAPIEndpoint}/");<br />
|
||||||
|
<br />
|
||||||
|
if (!response.ok) {<br />
|
||||||
|
// Do some error handling if the request fails<br />
|
||||||
|
}<br />
|
||||||
|
<br />
|
||||||
|
const blob = await response.blob();<br />
|
||||||
|
<br />
|
||||||
|
const objectURL = URL.createObjectURL(blob);<br />
|
||||||
|
<br />
|
||||||
|
<img src="{ objectURL }" />
|
||||||
|
</Codeblock>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
p {
|
||||||
|
@apply text-base;
|
||||||
|
@apply py-2;
|
||||||
|
@apply lg\:w-2\/3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
@apply text-4xl;
|
||||||
|
@apply font-bold;
|
||||||
|
@apply py-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
@apply text-2xl;
|
||||||
|
@apply font-bold;
|
||||||
|
@apply py-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
@apply hover\:underline;
|
||||||
|
@apply dark\:text-dodger-200;
|
||||||
|
@apply text-dodger-700;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
@apply pt-6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</Layout>
|
|
@ -0,0 +1,44 @@
|
||||||
|
---
|
||||||
|
import Codeblock from '../../components/Codeblock.astro';
|
||||||
|
import Layout from '../../layout/Layout.astro';
|
||||||
|
|
||||||
|
async function load() {
|
||||||
|
const response = await fetch(`${import.meta.env.SERVER_API_ENDPOINT}/total`, {
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
|
||||||
|
const responseBody = await response.json();
|
||||||
|
|
||||||
|
return {
|
||||||
|
total: responseBody.message,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** @type {import('./$types').PageData} */
|
||||||
|
export let data;
|
||||||
|
|
||||||
|
let { total } = await load();
|
||||||
|
---
|
||||||
|
<Layout lang="en">
|
||||||
|
<section>
|
||||||
|
<div class="flex flex-col lg:flex-row items-center py-8">
|
||||||
|
<div class="flex-1">
|
||||||
|
<h1 class="text-4xl sm:text-5xl md:text-6xl font-bold py-2">{$_('meta.tagline-total', { values: { total } })}</h1>
|
||||||
|
<p class="text-base py-4 md:w-2/3">{$_('meta.explanation')}</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1 md:px-6 w-full">
|
||||||
|
<div class="max-w-xs mx-auto">
|
||||||
|
<img alt="Sample joke" class="py-6 shadow-2xl" src={env.BROWSER_API_ENDPOINT + `/today`} />
|
||||||
|
</div>
|
||||||
|
<Codeblock>$ curl -XGET 'https://jokesbapak2.reinaldyrafli.com/api/'</Codeblock>
|
||||||
|
<p class="text-sm text-center py-4 opacity-70 hover:opacity-100 transition duration-300 ease-in-out">
|
||||||
|
{$_('home.more.1')}
|
||||||
|
<span class="hover:underline cursor-pointer" on:click={() => goto('/guide')}>{$_('navigation.guide')}</span>
|
||||||
|
{$_('home.more.2')}
|
||||||
|
<span class="hover:underline cursor-pointer" on:click={() => goto('/api')}>{$_('navigation.api')}</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</Layout>
|
|
@ -0,0 +1,71 @@
|
||||||
|
---
|
||||||
|
import Layout from "../../layout/Layout.astro";
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- <svelte:head>
|
||||||
|
<title>{$_('navigation.why')} - {$_('meta.title')}</title>
|
||||||
|
<meta content={$_('navigation.why') + '-' + $_('meta.title')} name="title" />
|
||||||
|
<meta content={$_('navigation.why') + '-' + $_('meta.title')} name="twitter:title" />
|
||||||
|
<meta content={$_('navigation.why') + '-' + $_('meta.title')} property="og:title" />
|
||||||
|
<link href="https://jokesbapak2.reinaldyrafli.com/why" rel="canonical" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="twitter:description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" property="og:description" />
|
||||||
|
</svelte:head> -->
|
||||||
|
<Layout>
|
||||||
|
<section class="why_page">
|
||||||
|
<h1 id="why-does-this-project-exists">{$_('why.exists.title')}</h1>
|
||||||
|
<p>{$_('why.exists.body.1')} {$_('why.exists.body.2')} {$_('why.exists.body.3')} {$_('why.exists.body.4')}</p>
|
||||||
|
<p>{$_('why.exists.body.5')} {$_('why.exists.body.6')}</p>
|
||||||
|
</section>
|
||||||
|
<section class="why_page">
|
||||||
|
<h1 id="can-i-submit-my-dad-joke">{$_('why.submit.title')}</h1>
|
||||||
|
<p>
|
||||||
|
{$_('why.submit.body.1')}
|
||||||
|
{$_('why.submit.body.2')}
|
||||||
|
<a href="mailto:aldy505@proton.me">{$_('why.submit.body.3')}</a>
|
||||||
|
{$_('why.submit.body.4')}
|
||||||
|
{$_('why.submit.body.5')}
|
||||||
|
{$_('why.submit.body.6')}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
<section class="why_page">
|
||||||
|
<h1 id="can-i-contribute">{$_('why.contribute.title')}</h1>
|
||||||
|
<p>
|
||||||
|
{$_('why.contribute.body.1')}
|
||||||
|
{$_('why.contribute.body.2')}
|
||||||
|
<a href="https://www.github.com/aldy505/jokes-bapak2">{$_('why.contribute.body.3')}</a>
|
||||||
|
{$_('why.contribute.body.4')}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
<section class="why_page">
|
||||||
|
<h1 id="other-inquiries">{$_('why.inquiries.title')}</h1>
|
||||||
|
<p>
|
||||||
|
{$_('why.inquiries.body.1')}
|
||||||
|
<a href="mailto:aldy505@proton.me">{$_('why.inquiries.body.2')}</a>, {$_('why.inquiries.body.3')}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
<style>
|
||||||
|
p {
|
||||||
|
@apply text-base;
|
||||||
|
@apply py-2;
|
||||||
|
@apply lg\:w-2\/3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
@apply text-3xl;
|
||||||
|
@apply font-bold;
|
||||||
|
@apply py-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
@apply hover\:underline;
|
||||||
|
@apply dark\:text-dodger-200;
|
||||||
|
@apply text-dodger-700;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
@apply pt-6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</Layout>
|
|
@ -0,0 +1,77 @@
|
||||||
|
---
|
||||||
|
// This page is meant to explain available API endpoints.
|
||||||
|
import Codeblock from '../../components/Codeblock.astro';
|
||||||
|
import Notice from '../../components/Notice.astro';
|
||||||
|
import Layout from '../../layout/Layout.astro';
|
||||||
|
|
||||||
|
const totalJokes = async (): Promise<string> => {
|
||||||
|
const response = await fetch(`${import.meta.env.API_ENDPOINT}/total`);
|
||||||
|
const responseBody = await response.json();
|
||||||
|
return responseBody.message;
|
||||||
|
};
|
||||||
|
|
||||||
|
let total = await totalJokes();
|
||||||
|
---
|
||||||
|
<!-- <svelte:head>
|
||||||
|
<title>{$_('navigation.api')} - {$_('meta.title')}</title>
|
||||||
|
<meta content={$_('navigation.api') + '-' + $_('meta.title')} name="title" />
|
||||||
|
<meta content={$_('navigation.api') + '-' + $_('meta.title')} name="twitter:title" />
|
||||||
|
<meta content={$_('navigation.api') + '-' + $_('meta.title')} property="og:title" />
|
||||||
|
<link href="https://jokesbapak2.reinaldyrafli.com/api" rel="canonical" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="twitter:description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" property="og:description" />
|
||||||
|
</svelte:head> -->
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<section>
|
||||||
|
<Notice emoji="💡">
|
||||||
|
{$_('api.limit')}
|
||||||
|
</Notice>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="api_page">
|
||||||
|
<h1>{$_('api.get.title')}</h1>
|
||||||
|
<h2>{$_('api.get.random.title')}</h2>
|
||||||
|
<p>{$_('api.get.random.body')}</p>
|
||||||
|
<Codeblock>
|
||||||
|
GET {import.meta.env.BROWSER_API_ENDPOINT}/
|
||||||
|
</Codeblock>
|
||||||
|
<h2>{$_('api.get.today.title')}</h2>
|
||||||
|
<p>{$_('api.get.today.body')}</p>
|
||||||
|
<Codeblock>
|
||||||
|
GET {import.meta.env.BROWSER_API_ENDPOINT}/today
|
||||||
|
</Codeblock>
|
||||||
|
<h2>{$_('api.get.id.title')}</h2>
|
||||||
|
<p>{$_('api.get.id.body', { values: { total } })}</p>
|
||||||
|
<Codeblock>
|
||||||
|
GET {import.meta.env.BROWSER_API_ENDPOINT}/id/{id}
|
||||||
|
</Codeblock>
|
||||||
|
<h2>{$_('api.get.total.title')}</h2>
|
||||||
|
<p>{$_('api.get.total.body')}</p>
|
||||||
|
<Codeblock>
|
||||||
|
GET {import.meta.env.BROWSER_API_ENDPOINT}/total
|
||||||
|
</Codeblock>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
h1 {
|
||||||
|
@apply text-4xl;
|
||||||
|
@apply font-bold;
|
||||||
|
@apply py-4;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
@apply text-2xl;
|
||||||
|
@apply font-bold;
|
||||||
|
@apply pt-6;
|
||||||
|
@apply pb-1;
|
||||||
|
}
|
||||||
|
|
||||||
|
p {
|
||||||
|
@apply text-base;
|
||||||
|
@apply opacity-80;
|
||||||
|
@apply py-2;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</Layout>
|
|
@ -0,0 +1,81 @@
|
||||||
|
---
|
||||||
|
import Codeblock from '../../components/Codeblock.astro';
|
||||||
|
import { _ } from 'svelte-i18n';
|
||||||
|
import env from '$lib/env';
|
||||||
|
import Layout from '../../layout/Layout.astro';
|
||||||
|
// This page is meant to guide people on how to use the API.
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- <svelte:head>
|
||||||
|
<title>{$_('navigation.guide')} - {$_('meta.title')}</title>
|
||||||
|
<meta content={$_('navigation.guide') + '-' + $_('meta.title')} name="title" />
|
||||||
|
<meta content={$_('navigation.guide') + '-' + $_('meta.title')} name="twitter:title" />
|
||||||
|
<meta content={$_('navigation.guide') + '-' + $_('meta.title')} property="og:title" />
|
||||||
|
<link href="https://jokesbapak2.reinaldyrafli.com/guide" rel="canonical" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="twitter:description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" property="og:description" />
|
||||||
|
</svelte:head> -->
|
||||||
|
|
||||||
|
<Layout>
|
||||||
|
<section class="guide_page">
|
||||||
|
<h1>{$_('navigation.guide')}</h1>
|
||||||
|
<p>
|
||||||
|
{$_('guide.introduction.1')}
|
||||||
|
{$_('guide.introduction.2')}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="guide_page">
|
||||||
|
<h2>{$_('guide.direct.1')} <code><img></code> {$_('guide.direct.2')}</h2>
|
||||||
|
<Codeblock><img src="{env.BROWSER_API_ENDPOINT}/" /></Codeblock>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="guide_page">
|
||||||
|
<h2>{$_('guide.fetch.1')}</h2>
|
||||||
|
<p>{$_('guide.fetch.2')}</p>
|
||||||
|
<Codeblock>
|
||||||
|
const response = await fetch("{env.BROWSER_API_ENDPOINT}/");<br />
|
||||||
|
<br />
|
||||||
|
if (!response.ok) {<br />
|
||||||
|
// {$_('guide.fetch.3')}<br />
|
||||||
|
}<br />
|
||||||
|
<br />
|
||||||
|
const blob = await response.blob();<br />
|
||||||
|
<br />
|
||||||
|
const objectURL = URL.createObjectURL(blob);<br />
|
||||||
|
<br />
|
||||||
|
<img src="{ objectURL }" />
|
||||||
|
</Codeblock>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
p {
|
||||||
|
@apply text-base;
|
||||||
|
@apply py-2;
|
||||||
|
@apply lg\:w-2\/3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
@apply text-4xl;
|
||||||
|
@apply font-bold;
|
||||||
|
@apply py-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
h2 {
|
||||||
|
@apply text-2xl;
|
||||||
|
@apply font-bold;
|
||||||
|
@apply py-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
@apply hover\:underline;
|
||||||
|
@apply dark\:text-dodger-200;
|
||||||
|
@apply text-dodger-700;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
@apply pt-6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</Layout>
|
|
@ -0,0 +1,44 @@
|
||||||
|
---
|
||||||
|
import Codeblock from '../../components/Codeblock.astro';
|
||||||
|
import Layout from '../../layout/Layout.astro';
|
||||||
|
|
||||||
|
async function load() {
|
||||||
|
const response = await fetch(`${import.meta.env.SERVER_API_ENDPOINT}/total`, {
|
||||||
|
method: 'GET',
|
||||||
|
});
|
||||||
|
|
||||||
|
const responseBody = await response.json();
|
||||||
|
|
||||||
|
return {
|
||||||
|
total: responseBody.message,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/** @type {import('./$types').PageData} */
|
||||||
|
export let data;
|
||||||
|
|
||||||
|
let { total } = await load();
|
||||||
|
---
|
||||||
|
<Layout lang="en">
|
||||||
|
<section>
|
||||||
|
<div class="flex flex-col lg:flex-row items-center py-8">
|
||||||
|
<div class="flex-1">
|
||||||
|
<h1 class="text-4xl sm:text-5xl md:text-6xl font-bold py-2">{$_('meta.tagline-total', { values: { total } })}</h1>
|
||||||
|
<p class="text-base py-4 md:w-2/3">{$_('meta.explanation')}</p>
|
||||||
|
</div>
|
||||||
|
<div class="flex-1 md:px-6 w-full">
|
||||||
|
<div class="max-w-xs mx-auto">
|
||||||
|
<img alt="Sample joke" class="py-6 shadow-2xl" src={env.BROWSER_API_ENDPOINT + `/today`} />
|
||||||
|
</div>
|
||||||
|
<Codeblock>$ curl -XGET 'https://jokesbapak2.reinaldyrafli.com/api/'</Codeblock>
|
||||||
|
<p class="text-sm text-center py-4 opacity-70 hover:opacity-100 transition duration-300 ease-in-out">
|
||||||
|
{$_('home.more.1')}
|
||||||
|
<span class="hover:underline cursor-pointer" on:click={() => goto('/guide')}>{$_('navigation.guide')}</span>
|
||||||
|
{$_('home.more.2')}
|
||||||
|
<span class="hover:underline cursor-pointer" on:click={() => goto('/api')}>{$_('navigation.api')}</span>
|
||||||
|
</p>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
</Layout>
|
|
@ -0,0 +1,71 @@
|
||||||
|
---
|
||||||
|
import Layout from "../../layout/Layout.astro";
|
||||||
|
---
|
||||||
|
|
||||||
|
<!-- <svelte:head>
|
||||||
|
<title>{$_('navigation.why')} - {$_('meta.title')}</title>
|
||||||
|
<meta content={$_('navigation.why') + '-' + $_('meta.title')} name="title" />
|
||||||
|
<meta content={$_('navigation.why') + '-' + $_('meta.title')} name="twitter:title" />
|
||||||
|
<meta content={$_('navigation.why') + '-' + $_('meta.title')} property="og:title" />
|
||||||
|
<link href="https://jokesbapak2.reinaldyrafli.com/why" rel="canonical" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" name="twitter:description" />
|
||||||
|
<meta content="Largest collection of Indonesian dad jokes as a consumable API" property="og:description" />
|
||||||
|
</svelte:head> -->
|
||||||
|
<Layout>
|
||||||
|
<section class="why_page">
|
||||||
|
<h1 id="why-does-this-project-exists">{$_('why.exists.title')}</h1>
|
||||||
|
<p>{$_('why.exists.body.1')} {$_('why.exists.body.2')} {$_('why.exists.body.3')} {$_('why.exists.body.4')}</p>
|
||||||
|
<p>{$_('why.exists.body.5')} {$_('why.exists.body.6')}</p>
|
||||||
|
</section>
|
||||||
|
<section class="why_page">
|
||||||
|
<h1 id="can-i-submit-my-dad-joke">{$_('why.submit.title')}</h1>
|
||||||
|
<p>
|
||||||
|
{$_('why.submit.body.1')}
|
||||||
|
{$_('why.submit.body.2')}
|
||||||
|
<a href="mailto:aldy505@proton.me">{$_('why.submit.body.3')}</a>
|
||||||
|
{$_('why.submit.body.4')}
|
||||||
|
{$_('why.submit.body.5')}
|
||||||
|
{$_('why.submit.body.6')}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
<section class="why_page">
|
||||||
|
<h1 id="can-i-contribute">{$_('why.contribute.title')}</h1>
|
||||||
|
<p>
|
||||||
|
{$_('why.contribute.body.1')}
|
||||||
|
{$_('why.contribute.body.2')}
|
||||||
|
<a href="https://www.github.com/aldy505/jokes-bapak2">{$_('why.contribute.body.3')}</a>
|
||||||
|
{$_('why.contribute.body.4')}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
<section class="why_page">
|
||||||
|
<h1 id="other-inquiries">{$_('why.inquiries.title')}</h1>
|
||||||
|
<p>
|
||||||
|
{$_('why.inquiries.body.1')}
|
||||||
|
<a href="mailto:aldy505@proton.me">{$_('why.inquiries.body.2')}</a>, {$_('why.inquiries.body.3')}
|
||||||
|
</p>
|
||||||
|
</section>
|
||||||
|
<style>
|
||||||
|
p {
|
||||||
|
@apply text-base;
|
||||||
|
@apply py-2;
|
||||||
|
@apply lg\:w-2\/3;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
@apply text-3xl;
|
||||||
|
@apply font-bold;
|
||||||
|
@apply py-2;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
@apply hover\:underline;
|
||||||
|
@apply dark\:text-dodger-200;
|
||||||
|
@apply text-dodger-700;
|
||||||
|
}
|
||||||
|
|
||||||
|
section {
|
||||||
|
@apply pt-6;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</Layout>
|
|
@ -0,0 +1 @@
|
||||||
|
<meta http-equiv="refresh" content="0;url=/en/" />
|
|
@ -1,19 +0,0 @@
|
||||||
<script lang="ts" context="module">
|
|
||||||
import type { ErrorLoad } from '@sveltejs/kit';
|
|
||||||
import Sentry from '$lib/logging';
|
|
||||||
|
|
||||||
export const load: ErrorLoad = ({ error }) => {
|
|
||||||
Sentry.captureException(error);
|
|
||||||
return {};
|
|
||||||
};
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import { goto } from '$app/navigation';
|
|
||||||
import { _ } from 'svelte-i18n';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<h1 class="text-5xl font-bold">{$_('error.heading')}</h1>
|
|
||||||
<p class="text-base" on:click={() => goto('/')}>{$_('error.homepage')}</p>
|
|
||||||
</section>
|
|
|
@ -1,55 +0,0 @@
|
||||||
<script lang="ts" context="module">
|
|
||||||
import '$lib/locale';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<script lang="ts">
|
|
||||||
import '@fontsource/fira-mono';
|
|
||||||
import '@fontsource/rubik';
|
|
||||||
import { _ } from 'svelte-i18n';
|
|
||||||
import Navbar from '../components/navbar.svelte';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<meta property="og:site_name" content={$_('meta.title')} />
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<div
|
|
||||||
class="bg-gradient-to-br from-transparent to-lavender-300 dark:(bg-gray-900 to-lavender-900 text-white) min-h-screen h-full w-full"
|
|
||||||
>
|
|
||||||
<div class="container mx-auto xl:px-40 lg:px-28 md:px-20 sm:px-12 px-8 w-full">
|
|
||||||
<header>
|
|
||||||
<Navbar />
|
|
||||||
</header>
|
|
||||||
<main class="font-body">
|
|
||||||
<slot />
|
|
||||||
</main>
|
|
||||||
|
|
||||||
<footer class="font-body py-8 w-full md:w-1/2 lg:w-2/5">
|
|
||||||
<div class="flex flex-col md:flex-row flex-wrap">
|
|
||||||
<div class="flex-initial pr-3">
|
|
||||||
<p class="text-sm opacity-50 hover:opacity-90 transition duration-300 ease-in-out inline-block">
|
|
||||||
{$_('footer.made')} <span class="text-red-500">❤</span>
|
|
||||||
{$_('footer.indonesia')}.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex-initial pr-3">
|
|
||||||
<p class="text-sm opacity-50 hover:opacity-90 transition duration-300 ease-in-out inline-block">
|
|
||||||
{$_('footer.available')}
|
|
||||||
<a href="https://www.github.com/aldy505/jokes-bapak2" class="hover:underline">{$_('footer.github')}</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex-initial pr-3">
|
|
||||||
<p class="text-sm opacity-50 hover:opacity-90 transition duration-300 ease-in-out inline-block">
|
|
||||||
{$_('footer.language')}
|
|
||||||
<a href="?lang=en" target="_top" class="hover:underline">{$_('footer.english')}</a>
|
|
||||||
|
|
|
||||||
<a href="?lang=id" target="_top" class="hover:underline">{$_('footer.indonesian')}</a>.
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</footer>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<style windi:global windi:preflights:global windi:safelist:global>
|
|
||||||
</style>
|
|
|
@ -1,19 +0,0 @@
|
||||||
import { $fetch } from 'ohmyfetch';
|
|
||||||
import env from '../lib/env';
|
|
||||||
|
|
||||||
interface TotalResponse {
|
|
||||||
message: number;
|
|
||||||
}
|
|
||||||
|
|
||||||
/** @type {import('./$types').PageServerLoad} */
|
|
||||||
export async function load() {
|
|
||||||
const response = await $fetch<TotalResponse>('total', {
|
|
||||||
method: 'GET',
|
|
||||||
baseURL: env.SERVER_API_ENDPOINT,
|
|
||||||
parseResponse: JSON.parse,
|
|
||||||
});
|
|
||||||
|
|
||||||
return {
|
|
||||||
total: response.message,
|
|
||||||
};
|
|
||||||
}
|
|
|
@ -1,43 +0,0 @@
|
||||||
<script lang="ts">
|
|
||||||
import { _ } from 'svelte-i18n';
|
|
||||||
import { goto } from '$app/navigation';
|
|
||||||
import env from '$lib/env';
|
|
||||||
import Codeblock from '../components/codeblock.svelte';
|
|
||||||
|
|
||||||
/** @type {import('./$types').PageData} */
|
|
||||||
export let data;
|
|
||||||
|
|
||||||
let total = data.total;
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>{$_('meta.title')} - {$_('meta.tagline')}</title>
|
|
||||||
<meta name="title" content={$_('meta.title') + '-' + $_('meta.tagline')} />
|
|
||||||
<meta name="twitter:title" content={$_('meta.title') + '-' + $_('meta.tagline')} />
|
|
||||||
<meta property="og:title" content={$_('meta.title') + '-' + $_('meta.tagline')} />
|
|
||||||
<link rel="canonical" href="https://jokesbapak2.reinaldyrafli.com/" />
|
|
||||||
<meta name="description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
<meta name="twitter:description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
<meta property="og:description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<div class="flex flex-col lg:flex-row items-center py-8">
|
|
||||||
<div class="flex-1">
|
|
||||||
<h1 class="text-4xl sm:text-5xl md:text-6xl font-bold py-2">{$_('meta.tagline-total', { values: { total } })}</h1>
|
|
||||||
<p class="text-base py-4 md:w-2/3">{$_('meta.explanation')}</p>
|
|
||||||
</div>
|
|
||||||
<div class="flex-1 md:px-6 w-full">
|
|
||||||
<div class="max-w-xs mx-auto">
|
|
||||||
<img src={env.BROWSER_API_ENDPOINT + `/today`} alt="Sample joke" class="py-6 shadow-2xl" />
|
|
||||||
</div>
|
|
||||||
<Codeblock>$ curl -XGET 'https://jokesbapak2.reinaldyrafli.com/api/'</Codeblock>
|
|
||||||
<p class="text-sm text-center py-4 opacity-70 hover:opacity-100 transition duration-300 ease-in-out">
|
|
||||||
{$_('home.more.1')}
|
|
||||||
<span class="hover:underline cursor-pointer" on:click={() => goto('/guide')}>{$_('navigation.guide')}</span>
|
|
||||||
{$_('home.more.2')}
|
|
||||||
<span class="hover:underline cursor-pointer" on:click={() => goto('/api')}>{$_('navigation.api')}</span>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</section>
|
|
|
@ -1 +0,0 @@
|
||||||
export const ssr = true;
|
|
|
@ -1,84 +0,0 @@
|
||||||
<script lang="ts">
|
|
||||||
// This page is meant to explain available API endpoints.
|
|
||||||
import { onMount } from 'svelte';
|
|
||||||
import { _ } from 'svelte-i18n';
|
|
||||||
import env from '$lib/env';
|
|
||||||
import { $fetch as omf } from 'ohmyfetch';
|
|
||||||
import Codeblock from '../../components/codeblock.svelte';
|
|
||||||
import Notice from '../../components/notice.svelte';
|
|
||||||
|
|
||||||
interface TotalResponse {
|
|
||||||
message: string;
|
|
||||||
}
|
|
||||||
|
|
||||||
let total;
|
|
||||||
|
|
||||||
onMount(async () => {
|
|
||||||
const totalJokes = async (): Promise<string> => {
|
|
||||||
const response = await omf<TotalResponse>(`${env.API_ENDPOINT}/total`);
|
|
||||||
return response.message;
|
|
||||||
};
|
|
||||||
|
|
||||||
total = await totalJokes();
|
|
||||||
});
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>{$_('navigation.api')} - {$_('meta.title')}</title>
|
|
||||||
<meta name="title" content={$_('navigation.api') + '-' + $_('meta.title')} />
|
|
||||||
<meta name="twitter:title" content={$_('navigation.api') + '-' + $_('meta.title')} />
|
|
||||||
<meta property="og:title" content={$_('navigation.api') + '-' + $_('meta.title')} />
|
|
||||||
<link rel="canonical" href="https://jokesbapak2.reinaldyrafli.com/api" />
|
|
||||||
<meta name="description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
<meta name="twitter:description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
<meta property="og:description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<section>
|
|
||||||
<Notice emoji="💡">
|
|
||||||
{$_('api.limit')}
|
|
||||||
</Notice>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="api_page">
|
|
||||||
<h1>{$_('api.get.title')}</h1>
|
|
||||||
<h2>{$_('api.get.random.title')}</h2>
|
|
||||||
<p>{$_('api.get.random.body')}</p>
|
|
||||||
<Codeblock>
|
|
||||||
GET {env.BROWSER_API_ENDPOINT}/
|
|
||||||
</Codeblock>
|
|
||||||
<h2>{$_('api.get.today.title')}</h2>
|
|
||||||
<p>{$_('api.get.today.body')}</p>
|
|
||||||
<Codeblock>
|
|
||||||
GET {env.BROWSER_API_ENDPOINT}/today
|
|
||||||
</Codeblock>
|
|
||||||
<h2>{$_('api.get.id.title')}</h2>
|
|
||||||
<p>{$_('api.get.id.body', { values: { total } })}</p>
|
|
||||||
<Codeblock>
|
|
||||||
GET {env.BROWSER_API_ENDPOINT}/id/{id}
|
|
||||||
</Codeblock>
|
|
||||||
<h2>{$_('api.get.total.title')}</h2>
|
|
||||||
<p>{$_('api.get.total.body')}</p>
|
|
||||||
<Codeblock>
|
|
||||||
GET {env.BROWSER_API_ENDPOINT}/total
|
|
||||||
</Codeblock>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
h1 {
|
|
||||||
@apply text-4xl;
|
|
||||||
@apply font-bold;
|
|
||||||
@apply py-4;
|
|
||||||
}
|
|
||||||
h2 {
|
|
||||||
@apply text-2xl;
|
|
||||||
@apply font-bold;
|
|
||||||
@apply pt-6;
|
|
||||||
@apply pb-1;
|
|
||||||
}
|
|
||||||
p {
|
|
||||||
@apply text-base;
|
|
||||||
@apply opacity-80;
|
|
||||||
@apply py-2;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,77 +0,0 @@
|
||||||
<script lang="ts">
|
|
||||||
import Codeblock from '../../components/codeblock.svelte';
|
|
||||||
import { _ } from 'svelte-i18n';
|
|
||||||
import env from '$lib/env';
|
|
||||||
// This page is meant to guide people on how to use the API.
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>{$_('navigation.guide')} - {$_('meta.title')}</title>
|
|
||||||
<meta name="title" content={$_('navigation.guide') + '-' + $_('meta.title')} />
|
|
||||||
<meta name="twitter:title" content={$_('navigation.guide') + '-' + $_('meta.title')} />
|
|
||||||
<meta property="og:title" content={$_('navigation.guide') + '-' + $_('meta.title')} />
|
|
||||||
<link rel="canonical" href="https://jokesbapak2.reinaldyrafli.com/guide" />
|
|
||||||
<meta name="description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
<meta name="twitter:description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
<meta property="og:description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<section class="guide_page">
|
|
||||||
<h1>{$_('navigation.guide')}</h1>
|
|
||||||
<p>
|
|
||||||
{$_('guide.introduction.1')}
|
|
||||||
{$_('guide.introduction.2')}
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="guide_page">
|
|
||||||
<h2>{$_('guide.direct.1')} <code><img></code> {$_('guide.direct.2')}</h2>
|
|
||||||
<Codeblock><img src="{env.BROWSER_API_ENDPOINT}/" /></Codeblock>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<section class="guide_page">
|
|
||||||
<h2>{$_('guide.fetch.1')}</h2>
|
|
||||||
<p>{$_('guide.fetch.2')}</p>
|
|
||||||
<Codeblock>
|
|
||||||
const response = await fetch("{env.BROWSER_API_ENDPOINT}/");<br />
|
|
||||||
<br />
|
|
||||||
if (!response.ok) {<br />
|
|
||||||
// {$_('guide.fetch.3')}<br />
|
|
||||||
}<br />
|
|
||||||
<br />
|
|
||||||
const blob = await response.blob();<br />
|
|
||||||
<br />
|
|
||||||
const objectURL = URL.createObjectURL(blob);<br />
|
|
||||||
<br />
|
|
||||||
<img src="{ objectURL }" />
|
|
||||||
</Codeblock>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
p {
|
|
||||||
@apply text-base;
|
|
||||||
@apply py-2;
|
|
||||||
@apply lg\:w-2\/3;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
@apply text-4xl;
|
|
||||||
@apply font-bold;
|
|
||||||
@apply py-2;
|
|
||||||
}
|
|
||||||
|
|
||||||
h2 {
|
|
||||||
@apply text-2xl;
|
|
||||||
@apply font-bold;
|
|
||||||
@apply py-2;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
@apply hover\:underline;
|
|
||||||
@apply dark\:text-dodger-200;
|
|
||||||
@apply text-dodger-700;
|
|
||||||
}
|
|
||||||
section {
|
|
||||||
@apply pt-6;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -1,71 +0,0 @@
|
||||||
<script lang="ts">
|
|
||||||
import { _ } from 'svelte-i18n';
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<svelte:head>
|
|
||||||
<title>{$_('navigation.why')} - {$_('meta.title')}</title>
|
|
||||||
<meta name="title" content={$_('navigation.why') + '-' + $_('meta.title')} />
|
|
||||||
<meta name="twitter:title" content={$_('navigation.why') + '-' + $_('meta.title')} />
|
|
||||||
<meta property="og:title" content={$_('navigation.why') + '-' + $_('meta.title')} />
|
|
||||||
<link rel="canonical" href="https://jokesbapak2.reinaldyrafli.com/why" />
|
|
||||||
<meta name="description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
<meta name="twitter:description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
<meta property="og:description" content="Largest collection of Indonesian dad jokes as a consumable API" />
|
|
||||||
</svelte:head>
|
|
||||||
|
|
||||||
<section class="why_page">
|
|
||||||
<h1 id="why-does-this-project-exists">{$_('why.exists.title')}</h1>
|
|
||||||
<p>{$_('why.exists.body.1')} {$_('why.exists.body.2')} {$_('why.exists.body.3')} {$_('why.exists.body.4')}</p>
|
|
||||||
<p>{$_('why.exists.body.5')} {$_('why.exists.body.6')}</p>
|
|
||||||
</section>
|
|
||||||
<section class="why_page">
|
|
||||||
<h1 id="can-i-submit-my-dad-joke">{$_('why.submit.title')}</h1>
|
|
||||||
<p>
|
|
||||||
{$_('why.submit.body.1')}
|
|
||||||
{$_('why.submit.body.2')}
|
|
||||||
<a href="mailto:aldy505@tutanota.com">{$_('why.submit.body.3')}</a>
|
|
||||||
{$_('why.submit.body.4')}
|
|
||||||
{$_('why.submit.body.5')}
|
|
||||||
{$_('why.submit.body.6')}
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
<section class="why_page">
|
|
||||||
<h1 id="can-i-contribute">{$_('why.contribute.title')}</h1>
|
|
||||||
<p>
|
|
||||||
{$_('why.contribute.body.1')}
|
|
||||||
{$_('why.contribute.body.2')}
|
|
||||||
<a href="https://www.github.com/aldy505/jokes-bapak2">{$_('why.contribute.body.3')}</a>
|
|
||||||
{$_('why.contribute.body.4')}
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
<section class="why_page">
|
|
||||||
<h1 id="other-inquiries">{$_('why.inquiries.title')}</h1>
|
|
||||||
<p>
|
|
||||||
{$_('why.inquiries.body.1')}
|
|
||||||
<a href="mailto:aldy505@tutanota.com">{$_('why.inquiries.body.2')}</a>, {$_('why.inquiries.body.3')}
|
|
||||||
</p>
|
|
||||||
</section>
|
|
||||||
|
|
||||||
<style>
|
|
||||||
p {
|
|
||||||
@apply text-base;
|
|
||||||
@apply py-2;
|
|
||||||
@apply lg\:w-2\/3;
|
|
||||||
}
|
|
||||||
|
|
||||||
h1 {
|
|
||||||
@apply text-3xl;
|
|
||||||
@apply font-bold;
|
|
||||||
@apply py-2;
|
|
||||||
}
|
|
||||||
|
|
||||||
a {
|
|
||||||
@apply hover\:underline;
|
|
||||||
@apply dark\:text-dodger-200;
|
|
||||||
@apply text-dodger-700;
|
|
||||||
}
|
|
||||||
|
|
||||||
section {
|
|
||||||
@apply pt-6;
|
|
||||||
}
|
|
||||||
</style>
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"extends": "astro/tsconfigs/strict"
|
||||||
|
}
|
|
@ -1,35 +0,0 @@
|
||||||
import preprocess from 'svelte-preprocess';
|
|
||||||
import adapter from '@sveltejs/adapter-node';
|
|
||||||
import { windi } from 'svelte-windicss-preprocess';
|
|
||||||
|
|
||||||
/** @type {import('@sveltejs/kit').Config} */
|
|
||||||
const config = {
|
|
||||||
// Consult https://github.com/sveltejs/svelte-preprocess
|
|
||||||
// for more information about preprocessors
|
|
||||||
preprocess: [
|
|
||||||
windi({
|
|
||||||
configPath: './windi.config.ts',
|
|
||||||
preflights: false,
|
|
||||||
}),
|
|
||||||
preprocess({ postcss: false }),
|
|
||||||
],
|
|
||||||
|
|
||||||
kit: {
|
|
||||||
// hydrate the <div id="svelte"> element in src/app.html
|
|
||||||
trailingSlash: 'never',
|
|
||||||
files: {
|
|
||||||
routes: './src/routes',
|
|
||||||
assets: './static',
|
|
||||||
hooks: {
|
|
||||||
server: './src',
|
|
||||||
client: './src',
|
|
||||||
},
|
|
||||||
lib: './src/lib',
|
|
||||||
},
|
|
||||||
adapter: adapter({
|
|
||||||
out: 'dist',
|
|
||||||
}),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
export default config;
|
|
|
@ -1,32 +0,0 @@
|
||||||
{
|
|
||||||
"extends": "./.svelte-kit/tsconfig.json",
|
|
||||||
"compilerOptions": {
|
|
||||||
"moduleResolution": "node",
|
|
||||||
"module": "es2020",
|
|
||||||
"lib": ["es2020"],
|
|
||||||
"target": "es2019",
|
|
||||||
/**
|
|
||||||
svelte-preprocess cannot figure out whether you have a value or a type, so tell TypeScript
|
|
||||||
to enforce using \`import type\` instead of \`import\` for Types.
|
|
||||||
*/
|
|
||||||
"importsNotUsedAsValues": "error",
|
|
||||||
"isolatedModules": true,
|
|
||||||
"resolveJsonModule": true,
|
|
||||||
/**
|
|
||||||
To have warnings/errors of the Svelte compiler at the correct position,
|
|
||||||
enable source maps by default.
|
|
||||||
*/
|
|
||||||
"sourceMap": true,
|
|
||||||
"esModuleInterop": true,
|
|
||||||
"skipLibCheck": true,
|
|
||||||
"forceConsistentCasingInFileNames": true,
|
|
||||||
"baseUrl": ".",
|
|
||||||
"allowJs": true,
|
|
||||||
"checkJs": true,
|
|
||||||
"paths": {
|
|
||||||
"$lib": ["src/lib"],
|
|
||||||
"$lib/*": ["src/lib/*"]
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"include": ["src/**/*.d.ts", "src/**/*.js", "src/**/*.ts", "src/**/*.svelte"]
|
|
||||||
}
|
|
|
@ -1,4 +1,4 @@
|
||||||
import { defineConfig } from 'windicss/helpers';
|
import { defineConfig } from 'unocss';
|
||||||
|
|
||||||
export default defineConfig({
|
export default defineConfig({
|
||||||
darkMode: 'media',
|
darkMode: 'media',
|
|
@ -1,6 +0,0 @@
|
||||||
import { sveltekit } from '@sveltejs/kit/vite';
|
|
||||||
import { defineConfig } from 'vite';
|
|
||||||
|
|
||||||
export default defineConfig({
|
|
||||||
plugins: [sveltekit()],
|
|
||||||
});
|
|
|
@ -76,7 +76,7 @@ services:
|
||||||
condition: service_healthy
|
condition: service_healthy
|
||||||
|
|
||||||
cache:
|
cache:
|
||||||
image: redis:6.2.7-alpine
|
image: redis:7.0.12-alpine3.18
|
||||||
ports:
|
ports:
|
||||||
- 6379:6379
|
- 6379:6379
|
||||||
healthcheck:
|
healthcheck:
|
||||||
|
|
Loading…
Reference in New Issue